* [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
@ 2018-08-28 2:48 Walter Dnes
2018-08-28 3:22 ` R0b0t1
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Walter Dnes @ 2018-08-28 2:48 UTC (permalink / raw
To: Gentoo Users List
[-- Attachment #1: Type: text/plain, Size: 363 bytes --]
So I went to an event on Friday August 24th, and snapped some pics on
my cellphone. Let's just say the datestamps were ridiculous. Is there
a conversion algorithm or program to correct it? This may be a Windows
versus linux thing. See attached listing...
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
[-- Attachment #2: list.txt.gz --]
[-- Type: application/octet-stream, Size: 1545 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-28 2:48 [gentoo-user] Cellphone VFAT datestamps versus linux datestamps Walter Dnes
@ 2018-08-28 3:22 ` R0b0t1
2018-08-28 4:07 ` R0b0t1
2018-08-29 2:05 ` Walter Dnes
2018-08-28 3:41 ` james
` (2 subsequent siblings)
3 siblings, 2 replies; 11+ messages in thread
From: R0b0t1 @ 2018-08-28 3:22 UTC (permalink / raw
To: gentoo-user
On Mon, Aug 27, 2018 at 9:48 PM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> So I went to an event on Friday August 24th, and snapped some pics on
> my cellphone. Let's just say the datestamps were ridiculous. Is there
> a conversion algorithm or program to correct it? This may be a Windows
> versus linux thing. See attached listing...
>
The high order bits are incrementing too quickly. I will check in a
bit, but I think you should parse them into epoch time and flip the
endianness.
What is the brand and model of your cellphone so I can avoid all
products from that company?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
[not found] <wrCeS-64V-1@gated-at.bofh.it>
@ 2018-08-28 3:31 ` james
2018-08-29 2:39 ` Walter Dnes
0 siblings, 1 reply; 11+ messages in thread
From: james @ 2018-08-28 3:31 UTC (permalink / raw
To: gentoo-user
On 8/27/18 10:50 PM, Walter Dnes wrote:
> So I went to an event on Friday August 24th, and snapped some pics on
> my cellphone. Let's just say the datestamps were ridiculous. Is there
> a conversion algorithm or program to correct it? This may be a Windows
> versus linux thing. See attached listing...
>
Exif is the data particulars form man image(photo) file formats
media-libs/exiftool
Read and write meta information in image, audio and video files
is but one. Surely there are many for the windows platform
also look for pages with 'opencv' in the name or description.
https://opencv.org
Exif is the best keyword to use in searching for tools and codes
https://en.wikipedia.org/wiki/ExifTool
hth,
James
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-28 2:48 [gentoo-user] Cellphone VFAT datestamps versus linux datestamps Walter Dnes
2018-08-28 3:22 ` R0b0t1
@ 2018-08-28 3:41 ` james
2018-08-28 3:58 ` james
2018-08-28 14:07 ` Mike Gilbert
3 siblings, 0 replies; 11+ messages in thread
From: james @ 2018-08-28 3:41 UTC (permalink / raw
To: gentoo-user
On 8/27/18 10:48 PM, Walter Dnes wrote:
> So I went to an event on Friday August 24th, and snapped some pics on
> my cellphone. Let's just say the datestamps were ridiculous. Is there
> a conversion algorithm or program to correct it? This may be a Windows
> versus linux thing. See attached listing...
>
https://en.wikipedia.org/wiki/ExifTool
media-libs/exiftool
OpenCV.org will have discussion groups where folks know far more than I
about images, photos and the myriad of file types were the data
is embedded into into the image file, photo or whatever. I'm only
recently been exposed to 'photogrammetry' and other associated codes
for image processing. One of the key areas for use of my HPC clusters
is in using thousands of photos to build 3D and 4D(3D + motion) models.
Gentoo is kinda void in advanced imaging codes despite many being open
sourced. Here's one where you'll surely find very knowledgeable folks
http://www.regard3d.org/
good_hunting
James
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-28 2:48 [gentoo-user] Cellphone VFAT datestamps versus linux datestamps Walter Dnes
2018-08-28 3:22 ` R0b0t1
2018-08-28 3:41 ` james
@ 2018-08-28 3:58 ` james
2018-08-28 14:07 ` Mike Gilbert
3 siblings, 0 replies; 11+ messages in thread
From: james @ 2018-08-28 3:58 UTC (permalink / raw
To: gentoo-user, Walter Dnes
On 8/27/18 10:48 PM, Walter Dnes wrote:
> So I went to an event on Friday August 24th, and snapped some pics on
> my cellphone. Let's just say the datestamps were ridiculous. Is there
> a conversion algorithm or program to correct it? This may be a Windows
> versus linux thing. See attached listing...
>
more direct answer...
https://www.howtogeek.com/302672/HOW-TO-VIEW-AND-EDIT-PHOTO-EXIF-DATA-ON-ANDROID/
Sure the $2.00 does not hurt, but if you search around there'll be free
tools to that read and manipulate EXIF data fields
more direct answer...
James
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-28 3:22 ` R0b0t1
@ 2018-08-28 4:07 ` R0b0t1
2018-08-29 2:05 ` Walter Dnes
1 sibling, 0 replies; 11+ messages in thread
From: R0b0t1 @ 2018-08-28 4:07 UTC (permalink / raw
To: gentoo-user
On Mon, Aug 27, 2018 at 10:22 PM, R0b0t1 <r030t1@gmail.com> wrote:
> On Mon, Aug 27, 2018 at 9:48 PM, Walter Dnes <waltdnes@waltdnes.org> wrote:
>> So I went to an event on Friday August 24th, and snapped some pics on
>> my cellphone. Let's just say the datestamps were ridiculous. Is there
>> a conversion algorithm or program to correct it? This may be a Windows
>> versus linux thing. See attached listing...
>>
>
> The high order bits are incrementing too quickly. I will check in a
> bit, but I think you should parse them into epoch time and flip the
> endianness.
>
You might mess with the below. Is there a seconds field? It doesn't
quite work, potentially due to the missing info. It still seems too
far off. Run with list as first argument.
EXIF data may work, but I'd be worried the same mistake was made,
assuming the people who wrote the camera software messed with the
drivers.
---
#!/usr/bin/env python3
import sys, os, struct
from datetime import datetime
from pprint import pprint
def main():
for line in open(sys.argv[1], 'r'):
date = ' '.join(line.strip().split()[3:6])
dt = datetime.strptime(date, '%b %d %Y')
pprint(dt)
ts = int(datetime.timestamp(dt))
pprint(ts)
rts = struct.unpack('<I', ts.to_bytes(4, byteorder='big'))[0]
pprint(rts)
rtd = datetime.fromtimestamp(rts)
pprint(rtd)
if __name__ == '__main__':
main()
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-28 2:48 [gentoo-user] Cellphone VFAT datestamps versus linux datestamps Walter Dnes
` (2 preceding siblings ...)
2018-08-28 3:58 ` james
@ 2018-08-28 14:07 ` Mike Gilbert
3 siblings, 0 replies; 11+ messages in thread
From: Mike Gilbert @ 2018-08-28 14:07 UTC (permalink / raw
To: gentoo-user
On Mon, Aug 27, 2018 at 10:48 PM Walter Dnes <waltdnes@waltdnes.org> wrote:
>
> So I went to an event on Friday August 24th, and snapped some pics on
> my cellphone. Let's just say the datestamps were ridiculous. Is there
> a conversion algorithm or program to correct it? This may be a Windows
> versus linux thing. See attached listing...
A tip: gzipping a 7 KB text file before attaching it is not
particularly useful and makes it more difficult to view. If it were a
plain text attachment, I could just open it in Gmail without leaving
my web browser.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-28 3:22 ` R0b0t1
2018-08-28 4:07 ` R0b0t1
@ 2018-08-29 2:05 ` Walter Dnes
1 sibling, 0 replies; 11+ messages in thread
From: Walter Dnes @ 2018-08-29 2:05 UTC (permalink / raw
To: gentoo-user
On Mon, Aug 27, 2018 at 10:22:30PM -0500, R0b0t1 wrote
> On Mon, Aug 27, 2018 at 9:48 PM, Walter Dnes <waltdnes@waltdnes.org> wrote:
> > So I went to an event on Friday August 24th, and snapped some pics on
> > my cellphone. Let's just say the datestamps were ridiculous. Is there
> > a conversion algorithm or program to correct it? This may be a Windows
> > versus linux thing. See attached listing...
> >
>
> The high order bits are incrementing too quickly. I will check in a
> bit, but I think you should parse them into epoch time and flip the
> endianness.
>
> What is the brand and model of your cellphone so I can avoid all
> products from that company?
Correction; the OS is not Windows or Android, but rather KaiOS.
This is an Alcatel Go Flip. It gets bad reviews from people used to
smartphones who expect easy-to-use wifi, bluetooth, email, and web
browsing. The camera is mediocre too. I use the Go Flip mostly as a
phone... dohhh. I like it because it's luddite and it has...
* a physical keypad
* a slot for a user microSD card. Media files, e.g. photos, can be
pointed to go to my 32 Gig card.
* a user-replacable battery.
* a functional FM radio. For an antenna it needs to have ear/head
phones plugged into "the jack they didn't have the courage to remove".
* no Google Garbage constantly running in the background, so the battery
lasts 10 or 11 days on standby.
* the option to take any available usable frequency band, or to force 2G
or 3G or 4G/LTE.
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-28 3:31 ` james
@ 2018-08-29 2:39 ` Walter Dnes
2018-08-29 5:35 ` james
2018-08-29 7:22 ` Neil Bothwick
0 siblings, 2 replies; 11+ messages in thread
From: Walter Dnes @ 2018-08-29 2:39 UTC (permalink / raw
To: gentoo-user
On Mon, Aug 27, 2018 at 11:31:33PM -0400, james wrote
> Exif is the data particulars form man image(photo) file formats
>
>
> media-libs/exiftool
> Read and write meta information in image, audio and video files
This is getting "curiouser and curiouser". I should have done this
sooner. I assumed that the datestamp and EXIF data would be the same.
But checking "properties" with gqview shows the EXIF date data is
correct, with the file datestamp being out to lunch...
[i660][waltdnes][~/camera/20180824] exiftool -T -CreateDate IMG_0363.jpg
2018:08:24 14:12:19
[i660][waltdnes][~/camera/20180824] ll -og IMG_0363.jpg
-rw-r--r-- 1 477731 Jan 26 2013 IMG_0363.jpg
Given this info, I can cobble together a short script. A "for" loop
cycles through "*.jpg". Read "CreateDate" from the EXIF data, and feed
it into the "touch" command, which would reset the physical file
datestamp.
--
Walter Dnes <waltdnes@waltdnes.org>
I don't run "desktop environments"; I run useful applications
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-29 2:39 ` Walter Dnes
@ 2018-08-29 5:35 ` james
2018-08-29 7:22 ` Neil Bothwick
1 sibling, 0 replies; 11+ messages in thread
From: james @ 2018-08-29 5:35 UTC (permalink / raw
To: gentoo-user
On 8/28/18 10:39 PM, Walter Dnes wrote:
> On Mon, Aug 27, 2018 at 11:31:33PM -0400, james wrote
>
>> Exif is the data particulars form man image(photo) file formats
>>
>>
>> media-libs/exiftool
>> Read and write meta information in image, audio and video files
>
> This is getting "curiouser and curiouser". I should have done this
> sooner. I assumed that the datestamp and EXIF data would be the same.
> But checking "properties" with gqview shows the EXIF date data is
> correct, with the file datestamp being out to lunch...
>
> [i660][waltdnes][~/camera/20180824] exiftool -T -CreateDate IMG_0363.jpg
> 2018:08:24 14:12:19
>
> [i660][waltdnes][~/camera/20180824] ll -og IMG_0363.jpg
> -rw-r--r-- 1 477731 Jan 26 2013 IMG_0363.jpg
>
> Given this info, I can cobble together a short script. A "for" loop
> cycles through "*.jpg". Read "CreateDate" from the EXIF data, and feed
> it into the "touch" command, which would reset the physical file
> datestamp.
>
Your other post; verycool old phone; I to have several flip phones
an LG still 'on service. JTAG interfaces to the hardware is even cooler.
Gotta get a giant magnifier for that sort of access work.
<snip>
Glad to have helped. If you get into EXIF data.
check out "photogammetry" as 2d still photos can be 'stitched' together
to create awesome 3D and 3D+motion models. One of the key usages of HPC.
If I can only stay healthy.... SfM (structure from motion) is my latest
addiction....
It's just very very cool technology. Some folks are building 3D-motion
models of the inside of their lab. Cover the wall with monitors
and then animate the objects inside, work remotely (like a VR game) or
walk into the home_lab and work as normal. Building your own, is where
the fun is. Get a UAV pilot's license and a sub 1K drone and well, just
let your imagination go wild!
gqview -- nice piece of old software. I'll have to check it out..
it's age on sourceforge is a bit to worry about. I'd pack it up and
put it in /usr/local/.... or at least into a github/gitlab/gogs or
wherever you archive codes. Lots of stuff is disappearing now, related
to geo-tagging and image processing. I've pretty much settled on
[ https://gogs.io ]
Surely there are plugins for palemoon that yield up EXIF data?
(btw palemoon-28.0.0 is very stable). Here are some random points of
interest,should your 2D images lead to 3D and beyond; here's a good intro::
https://www.prusaprinters.org/photogrammetry-3d-scanning-just-phone-camera/
<lots of codes in portage, hit me up if you are interested in more>
Here is the latest read on mixed reality::
https://software.intel.com/en-us/blogs/2018/06/18/siggraph-2018-the-state-of-photogrammetry-in-real-time-graphics
And if intel machines get 'out of control' well, we'll just have to jolt
the some electrons with odd_spin::
https://github.com/ptresearch/IntelTXE-PoC
All of this on gentoo? Sure, that's why I'm working on
Hybrid-heterogeneous HPC gentoo clusters. But I'm AMD_Radeon_arm64 open
source centric with my work. I'd be most appreciated if anyone can add more
detail, list of FOSS codes, or other related packages and details.
hth,
James
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [gentoo-user] Cellphone VFAT datestamps versus linux datestamps
2018-08-29 2:39 ` Walter Dnes
2018-08-29 5:35 ` james
@ 2018-08-29 7:22 ` Neil Bothwick
1 sibling, 0 replies; 11+ messages in thread
From: Neil Bothwick @ 2018-08-29 7:22 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 576 bytes --]
On Tue, 28 Aug 2018 22:39:51 -0400, Walter Dnes wrote:
> Given this info, I can cobble together a short script. A "for" loop
> cycles through "*.jpg". Read "CreateDate" from the EXIF data, and feed
> it into the "touch" command, which would reset the physical file
> datestamp.
You don't even need that, exiftool has a FileModifyDate tag, which is the
filesystem date not an EXIF tag, so you can simply set FileModifyDate to
CreateDate for each file.
exiftool '-FileModifyDate<CreateDate' *.jpg
--
Neil Bothwick
The best antiques are old friends.
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2018-08-29 7:22 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-28 2:48 [gentoo-user] Cellphone VFAT datestamps versus linux datestamps Walter Dnes
2018-08-28 3:22 ` R0b0t1
2018-08-28 4:07 ` R0b0t1
2018-08-29 2:05 ` Walter Dnes
2018-08-28 3:41 ` james
2018-08-28 3:58 ` james
2018-08-28 14:07 ` Mike Gilbert
[not found] <wrCeS-64V-1@gated-at.bofh.it>
2018-08-28 3:31 ` james
2018-08-29 2:39 ` Walter Dnes
2018-08-29 5:35 ` james
2018-08-29 7:22 ` Neil Bothwick
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox