I just got word I have a project waiting for me at work in the morning…Stripping out the LZW compression on 200,000 (yes, 200,000) images.
I did some testing with 1000 files in image events in 10.3, and it seems pretty quick. It rips through about 60 per minute. (G4 933 QS)
Now at home , I’m wondering if GC might be able to do it quicker. Unfortunately, I can’t do the comparison till the morning.
Soooooo…Can anyone tell me not even to mess around with GC? Image events definitely faster? Does image events take advantage of dual-processors? Using Photoshop is a no go, as about half of the images are getting EOF errors upon opening.
OR…
Is there any other way to remove the LZW encoding without opening each image?
The tiffutil CLI is probably the fastest. I tested this script:
On 2,000 small files and on a PB G4 1.25GHz 10.3.3 machine, this script ripped through the files in 207 seconds (about 580/minute). Some caveats: TEST ON DUPLICATES. This script will overwrite the existing files. You may get some speed improvements piping the standard output from find directly to tiffutil but I’m not sure it accepts that. You may also need to tweak the regex of the find command and, to avoid some memory issues, you may not want to have it process all 200,000 at once but batch it into slightly more manageable chunks. For more information, open the Terminal and “man tiffutil” and “man find”.
I think Jonn is probably right that the tiffutil command is probably the fastest way to go.
I however, would like further details about file size and image dimensions etc. so that I can do some comparisons using iMagine Photo, other tests suggest that iMagine Photo outperforms Image Events considerably, but it would be good to do a comparison against tiffutil for this type of thing.
I had to forgo tiffutil because in my preliminary testing, I couldn’t get it to properly process the files that had no (.tif) extension and/or the eof errors in photoshop. It processes them, but doesn’t “do” anything to them. (The mod date and characteristics stay the same as the original file)
I didn’t test it on my sample folder of 1000 ± images, and didn’t realize how wickedly fast it is! (500+ in 2-3 minutes) Anyway, after I found out that i’m gonna play around with it a little more.
Considering I gotta get started, I guess if all else fails i’ll process what I can with tiffutil and hand the rest off to image events.
I’ll post more info later for you ktam…I gotta get started/figure this out.
Thanks John! I’m not sure for what reason, but tiffutil was pretty inconsistent. Sometimes it would “process” the files without the extensions (as mentioned above), and other times it would error out. I took the easy route and removed the regex and just put in error checking to skip to the next file where necessary.
File count not quite 200k, but still a pain! Broke it up into 2500 file sections, and about 75% processed by tiffutil, then used image events for the remainder. Worked like a charm!
If this turns into a regular gig, will do more research with those errors.
And Kevin, will test iMagine photo when I have a chance. Will post results here.