We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › A way to retrieve date of an image file
Page Index Toggle Pages: 1
A way to retrieve date of an image file? (Read 579 times)
A way to retrieve date of an image file?
Feb 1st, 2009, 10:27pm
 
Hello,

I'm wondering if there is a way to retrieve the date (created/modified/etc.) of an image file (or any other kind of file for that matter) that's being used by the sketch?  I would like to use that information as parameters.

What sections of the reference material or libraries should I be looking at?  I'm also interested in possible interactions between processing and the metadata of jpgs.

Any advice or direction would be greatly appreciated.  Much thanks.
Re: A way to retrieve date of an image file?
Reply #1 - Feb 2nd, 2009, 11:10am
 
The Java File class offers the lastModifier() method, which is what you are looking for.
I see no way to access created/last accessed dates, probably because this info is Windows specific (or at least perhaps not available on all platforms).

To access metadata of Jpegs, I think you should search Java libraries to read Exif and IPTC data.
Page Index Toggle Pages: 1