[Originally posted by janc on 2009-05-18 17:52:11-07]
Hi friends.
I need to extract from from a dir with nef files the -PreviewImage with -Orientation tag
After many reading all about exiftool, I have been trying to do it in one command line but not success at all.
exiftool -fast -b -PreviewImage -w nef.jpg -ext nef DIR (this works ok)
With the above command I can get files -PreviewImage "file#.nef.jpg" from "file#.nef" but without -Orientation tag
And with a second command I try to copy -Orientation tag from nef files "file#.nef" to the new "file#.nef.jpg" but no success.
exiftool -fast -overwrite_original -tagsFromFile %d%f.nef -Orientation -ext nef.jpg DIR (this not working)
If it is posible to do it with only one command line, will be great.
Please, can you help me? I need to do it with only one command line, if it is possible.
Thanks in advanced for this wonderful exiftool.
My best regards.
[Originally posted by exiftool on 2009-05-18 22:34:28-07]
This is a bit tricky, but you can use the -execute
option to combine different commands into a single command
line. I think this may do what you want, but I can't test
it right now to make sure I didn't do something wrong:
exiftool -b -previewimage -w nef.jpg -ext nef DIR -execute -tagsfromfile @ -orientation -srcfile %d%f.%e.jpg -ext nef DIR
- Phil
[Originally posted by linuxuser on 2009-05-18 22:57:07-07]
I tried this with a pef-file and it works generally, but errors are displayed. Error: File not found *pef.jpg. Also I used -w pef.jpeg, because I like to have the extension jpeg and not jpg. It allows me to delete all _created_ files, which use jpeg, while original jpg-files are untouched.
[Originally posted by janc on 2009-05-19 09:23:02-07]
Hi friend.
Thanks a lot, Phil and Linuxuser for your prompt reply.
Yes, it is tricky and I use it from a Java program with "Runtime.getRuntime().exec(exiftool_command);"
I have dirs with a mixture of NEF and JPG original files and I need to get 256x256 thumbnails of them with the right orientation.
The jpg files I get with this code are intermediate to get 256x256 pixels thumbnails with "mogrify", so after I need to delete those intermediate .nef.jpg
Phil, I am going to test your proposal with needed variations, I will let you know about, sure :-)
Linuxuser, you had a nice idea, I use nef.jpg to be able to differentiate them from original jpg, but it could be also just .JPEG so I will not need a double extension.
I will comeback as soon as I have some results after testing with these new possibilities.
Phil, thanks a lot for this very nice exiftool. I will let you know about my program for photography classification.
My best regards.
P.D. Escuse me about my english, I am from Spain :-)
[Originally posted by janc on 2009-05-19 11:06:53-07]
Hi Phil and Linuxuser.
I think I have found the coding solution for my program, I am very happy :-))
"exiftool -b -previewimage -w jpeg -ext nef . -execute -overwrite_original -tagsfromfile %d%f.nef -Orientation -ext jpeg ."
I made test with nef files but it will be like: cr2, raf, rw2, jpg as original from cameras.
With this one a get the previewimage of any raw file with the right orientation tag in it and with JPEG extension, so I can delete JPEGs after "mogrify" reduced them to PNG with 256x256 pixels without afecting originals jpg in the same dir.
Thanks a lot Phil and Linuxuser, both have guide me to the nice solution.
Muchisimas gracias :-)
My best regards.
P.D. I will keep you inform about my photo clasification system that is universal because it only use pure text files to keep photo tags and Java.
[Originally posted by exiftool on 2009-05-19 11:23:09-07]
Great. Glad you figured this out. My command line didn't work because
I needed an extra "." as in -w .nef.jpg
- Phil
[Originally posted by linuxuser on 2009-05-19 11:24:24-07]
Can you explain with a few sentences what your photo clasification system does?
[Originally posted by janc on 2009-05-19 15:38:10-07]Hi Linuxuser.
Of course I will try to explain how I classify photo originals.
It is a system for personal use with some thousand photos per year, but not for photo agencies. It will be full free with some kind of GPL/Copyleft.
HardDisk
|__MyPhotos
| |__2007
|__2008
|__2009
|__090110_After_Christmas
|__090125_Another_sesion
|__...
|__090519_Last_photo_work
|__autor_090519_1234.raw
|__autor_090519_1235.raw
|__auror_090519_1236.raw
|__...
|__090519_Las_photo_work.dat
|__thumbnails
|__autor_090519_1234.raw.png (255x255pixels)
|__autor_090519_1235.raw.png
|__...
The data file: 090519_Las_photo_work.dat (pure text content)
0 common tag words to all photo of this session
1 autor_090519_1234.raw particular tag words for this photo as many as you wont
2 autor_090519_1235.raw particular tag words for this photo as many as you wont
3 autor_090519_1236.raw particular tag words for this photo as many as you wont
4 ...
Until now I have some years clasified with this system using just standar text editors and standar OS searching possibilities, but now I have programed this GUI to make it easy.
The programa:
Organizing: (Sessions)
Rename photos in a session with the escheme: autor_yymmdd_####.ext extracted from exif data, autor is in program config.
Create png thumbnails 255x255 with right orientation.
Classifying: (Sessions)
Display a list of session photos and a text box where to write tags with nice easiness.
Searching: (all sessions, a year, one session)
Search for photos with a boolean combination of tag words and you see thumbnails of results.
If double click in a result word jumps to Classifying with the session of the click photo.
If double click in the thumbnail, jumps and opens the photo with Gimp or any other photo editor.
Histogram: (word histogram)
In two lists -Alfabetical order and -Quantity order. If double click in a word jumps to Searching with that word.
When hard disk are full, you have the thumbnails to see the photo, DVD are tittle with just 090110_090119, so you know which sessions and photos are in that dvd.
The system and program name is: "Siaclafo" Sistema Abierto para Clasificacion de Fotografia. Open System for Photo Classifying.
Advantages: It can work in any Operating System, any version now and in the future. Just pure text, everybody can easily see and edit.
Actual test speed, PC Linux, single CPU 2.8 Mhz: Average searching time in a tree with: 3 Years, 500 Sessions, 5000 photos, 730 diferent tag words = 12 seconds.
Please, ask anything you like.
Best regards.