View Full Version : Extract and display date from EXIF?
wellman
Jan-21-2006, 11:37 AM
I'm taking a little break from my "layout" customization and working on some "content" customization. Is it possible to extract the date of a photo from EXIF and display it under the caption? I was able to to this via PHP on my old DIY site, and I'd like date info to show on Smugmug.
At first, I thought I could turn on "Camera Info" on the gallery customizatio settings and then turn off everything but the date, but the camera info only shows the camera model, orig size, etc. You have to click the EXIF link to see other data.
Any ideas?
Andy
Jan-21-2006, 11:52 AM
I'm taking a little break from my "layout" customization and working on some "content" customization. Is it possible to extract the date of a photo from EXIF and display it under the caption? I was able to to this via PHP on my old DIY site, and I'd like date info to show on Smugmug.
At first, I thought I could turn on "Camera Info" on the gallery customizatio settings and then turn off everything but the date, but the camera info only shows the camera model, orig size, etc. You have to click the EXIF link to see other data.
Any ideas?
Sounds like a javascript trick, maybe. Stay tuned for the JS gurus....
rainforest1155
Jan-21-2006, 10:33 PM
I put a request in the feature request thread (http://www.dgrin.com/showthread.php?t=23482&page=13#post225196) to have an option to display the EXIF data and time below the caption - feel free to add your thoughts to this and hopefully we'll have the function then sometimes! :wink
Sebastian
Andy
Jan-22-2006, 03:46 AM
I put a request in the feature request thread (http://www.dgrin.com/showthread.php?t=23482&page=13#post225196) to have an option to display the EXIF data and time below the caption - feel free to add your thoughts to this and hopefully we'll have the function then sometimes! :wink
Sebastian
:nah I'm pretty sure that's not so likely. Most folks don't want the clutter on the screen. We have a nice button now, how hard is it to push a button when you want to see the camera details :D
rainforest1155
Jan-22-2006, 12:46 PM
:nah I'm pretty sure that's not so likely. Most folks don't want the clutter on the screen. We have a nice button now, how hard is it to push a button when you want to see the camera details :D
For my father a date is the single most important thing on a lot of things - especially on photos. Plus I put the date manually in every caption and this feature could save me a lot of time. I guess there are different kind of people - so why not make it optional and by default off? :dunno
In fact I don't care much about the field that tells me I shot the picture with a Sony camera - instead I would like to put the date in which should work easily by some additional CSS IDs.
Would really appreciate this nice little feature!
Thanks,
Sebastian
Andy
Jan-22-2006, 01:32 PM
For my father a date is the single most important thing on a lot of things - especially on photos. Plus I put the date manually in every caption and this feature could save me a lot of time. I guess there are different kind of people - so why not make it optional and by default off? :dunno
In fact I don't care much about the field that tells me I shot the picture with a Sony camera - instead I would like to put the date in which should work easily by some additional CSS IDs.
Would really appreciate this nice little feature!
Thanks,
Sebastian
Thanks again for asking Sebastian. There are many styles - themes - to consider - and the Exif takes a lot of space. Maybe a javascript routine can be written, or some other customizing trick?
rainforest1155
Jan-22-2006, 11:45 PM
There are many styles - themes - to consider - and the Exif takes a lot of space. Maybe a javascript routine can be written, or some other customizing trick?
Right now I can't think of a possible approach towards this without any change from your side. It's not that urgent, but maybe in a long run you can give us some more additional customization possibilities that are turned off by default with the disclaimer that they might not yet work with all themes.
Perhaps one of the Javascript coders has got an idea how to extract data from the additional exif-link.
As for now I'll just continue to place the data in the caption. Maybe I can get a script done in my local database to do this for me.
Sebastian
devbobo
Jan-23-2006, 03:09 AM
I am going to post this for a reference, but it looks like the powers that be have disabled access.
I don't know how practical this would be since, it returns the entire exif html everything it requested. The best way about be for the newexif.mg for be modified to except additional parameters which only return a tiny subset of the exif html.
function handleEXIF(response)
{
var sDate;
re = /Date Taken:<\/strong><\/td>[\W]+<td> ([0-9\-: ]*)<\/td>/;
if (re.exec(response))
sDate = RegExp.$1;
alert(sDate);
}
function getEXIF(sImageID)
{
ajax_query(handleEXIF, 'http://www.smugmug.com/photos/newexif.mg?ImageID=' + sImageID, null, true);
}
Cheers,
David
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.