 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
bob_C Guest
|
Posted: Tue May 15, 2007 2:31 pm Post subject: date picture taken |
|
|
I am trying to access the "Date Picture Taken" heading in the details view to sort pictures. Not the "Last modified" can someone tell me if this is possible and what the command is.
Like with Last Modified it is.
%A_LoopFileTimeModified%
What is the "Date Picture Taken" version of the above command.
Thanks |
|
| Back to top |
|
 |
BETLOG
Joined: 27 Nov 2006 Posts: 218 Location: Queensland, Australia
|
|
| Back to top |
|
 |
Gast (w/ nick)
Joined: 28 Nov 2005 Posts: 14
|
Posted: Tue May 15, 2007 3:49 pm Post subject: |
|
|
Once the file is modified, the original data can't be seen by the operating system (to my knowledge)
If your camera stores the date taken in the Exif-Data of the image,
you could look there or google for other exif-reading tools.
http://www.codeproject.com/csharp/exifextractor.asp |
|
| Back to top |
|
 |
Grumpy Guest
|
Posted: Tue May 15, 2007 5:17 pm Post subject: |
|
|
Double post: picture organization
And original proposal was about A_LoopFileTimeCreated, which make more sense (if camera sets it) than A_LoopFileTimeModified... |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5882
|
Posted: Tue May 15, 2007 5:21 pm Post subject: Re: date picture taken |
|
|
| bob_C wrote: | | I am trying to access the "Date Picture Taken" heading in the details view to sort pictures. |
If all the photos have been taken from the same camera, post a sample image and I can give you a customised binary function that will extract the Exif date from the file.
 |
|
| Back to top |
|
 |
bob_c Guest
|
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6721 Location: France (near Paris)
|
Posted: Tue May 15, 2007 5:49 pm Post subject: |
|
|
Found in the forum: JPEG Metainformation
Thanks BoBo the utility finder!
Correct URL: Exiv2 - Exif and IPTC metadata library and tools
Result:
| Code: | output = %A_Temp%\$$ExivOutput$$
RunWait %comspec% /c exiv2 -Pnv E:\Documents\Images\Exif_kodak-dc240.jpg > %output%, , Hide
FileRead exifData, %output%
FileDelete %output%
; DateTimeOriginal 1999:05:25 21:00:09
RegExMatch(exifData, "m)^DateTimeOriginal\s+(.*)$", date)
MsgBox Photo taken at %date1%
|
I use the old method of redirecting to a file.
You might prefer to use CMDret, StdoutToVar or Std In/Out/Err via COM _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")
Last edited by PhiLho on Wed May 16, 2007 9:31 am; edited 1 time in total |
|
| Back to top |
|
 |
SKAN
Joined: 26 Dec 2005 Posts: 5882
|
Posted: Tue May 15, 2007 9:20 pm Post subject: |
|
|
Try this code along with copies of some pictures taken in different resolution, You should see a MsgBox for each picture.
Well, I am not sure about my code. If you find it does not work for many photos then I will need a couple of more images.
| Code: | SetWorkingDir, %A_ScriptDir%
Loop *.jpg
{
ImgTime := Kodak( A_LoopFileLongPath )
If ! ImgTime
Continue
FormatTime, Time, %ImgTime%,MMM,dd yyyy [ hh:mm.ss tt ]
MsgBox, 0, %A_LoopFileName%, % Time
}
Kodak( file="" ) {
FileRead, binData, *m2048 %file%
P := &binData, RV := 0
Loop, 2048
If ( *(P+(A_Index-1)) = 0 )
DllCall( "RtlFillMemory", UInt, P+(A_Index-1), Int,1, UChar,32 )
IfNotInString, binData, KDK0002IDX4530, Return 0
Loop, Parse, binData, `n
If ( SubStr(A_LoopField,5,1 ) = ":" AND SubStr(A_LoopField,8,1 ) = ":" )
{
StringReplace, RV, A_LoopField, %A_Space%,, All
StringReplace, RV, RV, :,, All
RV := SubStr( RV, 1, 14 )
}
Return RV
} |
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|