Extract JPGs from EIPs programmatically?
Cross posted in CO11 Software Mac:
I'm wondering if there is a way to programmatically extract the preview JPG files from EIP files. We use ExifTool and can do it with CR2 files but I haven't been able to figure out how to do it with the EIPs since they are a zip package. Wondering if anyone else has tried to do this?
This is the code that extracts from a CR2:
exiftool -b -PreviewImage -w _preview.jpg -ext cr2 -r /path/to/folder
I'm wondering if there is a way to programmatically extract the preview JPG files from EIP files. We use ExifTool and can do it with CR2 files but I haven't been able to figure out how to do it with the EIPs since they are a zip package. Wondering if anyone else has tried to do this?
This is the code that extracts from a CR2:
exiftool -b -PreviewImage -w _preview.jpg -ext cr2 -r /path/to/folder
0
-
Hi Sean
If the file is "GM5-17_0027.eip" in the Unix shell's current folder, then the following Unix command will create the subbolder "GM5-17_0027" and extract the contents to the folder:ditto -x -k GM5-17_0027.eip ./GM5-17_0027
The image file inside the folder is "0.RW2" in the case that the original was "GM5-17_0027.RW2"
Also useful are:
"ditto" is a standard part of OSX's Unix:man ditto0 -
Thanks Eric. This definitely works but we won't be able to process out for each file. We shoot thousands of images per day so the additional processing time is likely too much (as is actually processing out each image via CapOne). I was just hoping there was a way to sneakily pull out a preview file that was already present. If only we didn't have to use the EIP format. This additional preview extraction would be easy with just the raw files. 😄 0 -
So in that case, run this as a background task while the operator and the AppleScript are doing something about the next shot.
By the time the next shot is finished, the preview jpg from the previous shot has been dumped in some collection folder.
You can either write a Unix script to run in background mode, and you can even use OSX’s Archive.app as part of it.tell system events to tell application “Archive†to open [i]some_file.eip[/i]
Archive will execute this and not send a response, if you tell AppleScript to use a 0 wait time, then Archive will effectively run in the background while the AppleScript moves on.
Archive and ditto are pretty fast, it is exiftool which is slow - unless you as exiftool to process every raw file in a folder in one command. “Do shell script†is also slow. So minimize your use of these commands.0
Post ist für Kommentare geschlossen.
Kommentare
3 Kommentare