Updating Origination Timestamp from EXIF data?

brashquido

Joined: 2006-09-13
Posts: 56
Posted: Sun, 2009-11-01 02:28


Gallery URL = http://domandnat.com/main.php
Gallery version = 2.3 core 1.3.0
API = Core 7.54, Module 3.9, Theme 2.6, Embed 1.5
PHP version = 5.2.11 cgi-fcgi
PHPInfo Link = http://domandnat.com/phpinfo.php
Webserver = Microsoft-IIS/7.0
Database = mysql 5.0.51b-community-nt-log, lock.system=database
Toolkits = Gd, Thumbnail, ImageMagick, Exif
Acceleration = none/432000, none/3600
Operating system = Windows NT DOMINIC 6.0 build 6002 (Windows 2008 Server SP2)
Default theme = carbon
gettext = enabled
Locale = en_US
Browser = Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9.0.14) Gecko/2009082707 Firefox/3.0.14 (.NET CLR 3.5.30729)
Rows in GalleryAccessMap table = 15
Rows in GalleryAccessSubscriberMap table = 3931
Rows in GalleryUser table = 6
Rows in GalleryItem table = 3922
Rows in GalleryAlbumItem table = 42
Rows in GalleryCacheMap table = 18502

Have just uploaded close to 400 photos from a recent holiday only to realise that the EXIF Origination Timestamp is one year behind what it should be. Turns out when I got my new Sony A700 I failed to set the clock properly. I've since used exiftool to correct all the dates which worked like a charm, however now I am wondering how I go about getting this information updated in Gallery 2.

I have updated the photos themselves with exiftool, and then in Gallery 2 deleted all caches and have regenerated all the thumbnails. It seems this is not enough, and from what I can see all this data is stored in the g2_item table in the g_originationTimestamp field. When I go into edit each effected photo I can see under "Photo Date and Time " that the correct date is being listed from EXIF and I can update the photos to the correct date by clicking this link. With 400 odd photos to update though I really would much rather find some way to force Gallery 2 to update the EXIF Origination Timestamp for all photos.

Can anyone offer any advice with this?

Login or register to post comments
brashquido

Joined: 2006-09-13
Posts: 56
Posted: Mon, 2009-11-02 11:05

Is there anyway someone can show me how to modify the script in this thread so that it is able to rescan all the EXIF data?

Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 9281
Posted: Mon, 2009-11-02 17:55

The only way I've done this is by re-uploading...
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
brashquido

Joined: 2006-09-13
Posts: 56
Posted: Wed, 2009-11-04 02:52

I shouldn't have to go to the extent of re-uploading. The EXIF date of those photos is now updated, and if I go into edit photo the correct EXIF date is being shown in the "Photo Date and Time" section. It is just the date now stored in the G2 database that is the issue. At worst I'll have to go through each of those 400 odd photos and force an update from the EXIF data.

Had a bit of a look through the Gallery 2 API, and I think I'd need the getMetaData method to do what I want. My coding skills are non existant, so would really appreciate some help modifying the script linked above. From what I can tell what needs to be done is to force the script to update the metadata as part of the rescan.

Login or register to post comments