Need a stripper
February 23, 2006 11:25 AM Subscribe
Help me batch-strip resources from thousands of image files.
I'm using a G5 running OSX 10.4.5 to do all sorts of graphic design and editing. I use GraphicConverter to do many tasks, including browsing large directories. I have finally figured out how to tweak the GC settings so as to browse directories without adding huge resources to every file. This is important for storage space because a 50k JPG becomes a 175k JPG if you add a resource fork. Think 1000+ photos in a few dozen directories, and you can see how this adds to storage bloat big time.
So, I've figured out how to stop GraphicConverter from adding the new resource... how do I go back and strip the resource off of all those bloated old files that have already been affected? I could save 75% of my image storage if I can figure out how to do this. How do I automate the task? I'll be keeping a copy of the originals, of course... but are there any other precautions I should consider?
I'll be checking back frequently, so feel free to ask specific questions.
I'm using a G5 running OSX 10.4.5 to do all sorts of graphic design and editing. I use GraphicConverter to do many tasks, including browsing large directories. I have finally figured out how to tweak the GC settings so as to browse directories without adding huge resources to every file. This is important for storage space because a 50k JPG becomes a 175k JPG if you add a resource fork. Think 1000+ photos in a few dozen directories, and you can see how this adds to storage bloat big time.
So, I've figured out how to stop GraphicConverter from adding the new resource... how do I go back and strip the resource off of all those bloated old files that have already been affected? I could save 75% of my image storage if I can figure out how to do this. How do I automate the task? I'll be keeping a copy of the originals, of course... but are there any other precautions I should consider?
I'll be checking back frequently, so feel free to ask specific questions.
Sorry, I didn't read your question that carefully. I'm not sure ImageMagick "speaks" resource forks. I was thinking of EXIF metadata and thumbnails. What exactly does GC put in the resource fork?
posted by evariste at 12:00 PM on February 23, 2006
posted by evariste at 12:00 PM on February 23, 2006
wow, this is totally not what I expected to find given the post title...
Anyways, if you want to blow away the ENTIRE resource fork, a script like this, run from Terminal, in the proper directory will do the trick:
(make a backup first)
posted by chuma at 12:22 PM on February 23, 2006
Anyways, if you want to blow away the ENTIRE resource fork, a script like this, run from Terminal, in the proper directory will do the trick:
(make a backup first)
for file in *;
do
if [ -s $file/rsrc ]
then rm $file/rsrc;
fi
done
posted by chuma at 12:22 PM on February 23, 2006
GraphicConverter puts the usual things in the resource fork -- image thumbnail, custom icon, etc. -- unless you turn this off.
squirrel just wants to stip the resource forks and make a copy. ditto --norsrc is what he/she wants. There are probably drag-and-drop resource strippers at VersionTracker if the command line is not suitable.
posted by kindall at 12:24 PM on February 23, 2006
squirrel just wants to stip the resource forks and make a copy. ditto --norsrc is what he/she wants. There are probably drag-and-drop resource strippers at VersionTracker if the command line is not suitable.
posted by kindall at 12:24 PM on February 23, 2006
Response by poster: evariste, that's a good question. I've tried to figue out what all goes into the bloat. I mean, if a file's got 50k of jpg data, how can a mere thumbnail add 100k to that? I do know that it used to attach what it called "huge thumbnails" (I'll attach images of the two pertinent setting windows--as they are now). Perhaps those huge thumbs were uncompressed. I do know that if I select a file in the finder, get info on it, and manually delete the icon image, the file size returns to it's previous size.

and

posted by squirrel at 12:31 PM on February 23, 2006

and

posted by squirrel at 12:31 PM on February 23, 2006
I use QuickImageCM. It also has an excellent mini-editor for cropping/resizing, but for your purposes it will let you select a ton of images, control-click them, and strip resource forks in one fell swoop.
posted by bcwinters at 12:52 PM on February 23, 2006
posted by bcwinters at 12:52 PM on February 23, 2006
There used to be an application just called "Resource Stripper" but I can't find it.
This seems to be the kind of thing you want: http://www.versiontracker.com/dyn/moreinfo/macosx/24401.
I'd love to know what's going on with Graphic Converter. Hundreds of kilobytes in the resource fork? That's just wrong.
posted by AmbroseChapel at 2:06 PM on February 23, 2006
This seems to be the kind of thing you want: http://www.versiontracker.com/dyn/moreinfo/macosx/24401.
I'd love to know what's going on with Graphic Converter. Hundreds of kilobytes in the resource fork? That's just wrong.
posted by AmbroseChapel at 2:06 PM on February 23, 2006
That "icon suite" thing might help explain it.
That's not one icon, that's like twenty different icons at different sizes and colour depths.
posted by AmbroseChapel at 2:11 PM on February 23, 2006
That's not one icon, that's like twenty different icons at different sizes and colour depths.
posted by AmbroseChapel at 2:11 PM on February 23, 2006
I use GrimRipper, which is a contextual menu add-on for the Finder. You can set it anywhere between paranoid and "I know what I'm doing" mode.
posted by O9scar at 4:53 PM on February 23, 2006
posted by O9scar at 4:53 PM on February 23, 2006
Response by poster: Yeah, Ambrose, I think it's that icon suite that's to blame for the bloat. I can't blame GC, though... I think I may have selected that option at some point. It's probably useful for someone.
Thanks to everyone for their input.
posted by squirrel at 12:38 AM on February 24, 2006
Thanks to everyone for their input.
posted by squirrel at 12:38 AM on February 24, 2006
Response by poster: Follow-up:
I installed the QuickImage plug-in and have been experimenting with *copies* of my big photo folders. Here's what I've found so far:
• Original folder size, with 985 bloated files: 170MB
• Folder size after auto-stripping all thumbs: 127MB
• After thumb-stripping AND resource-stripping: 79MB!
• After then opening that folder in a GraphicConverter browser window so that new thumbs are attached in accordance with the settings you see above: 85MB
So, stripping the resources and reattaching sane thumbs gives the user a 50% storage savings. Not bad!
posted by squirrel at 11:42 AM on February 24, 2006
I installed the QuickImage plug-in and have been experimenting with *copies* of my big photo folders. Here's what I've found so far:
• Original folder size, with 985 bloated files: 170MB
• Folder size after auto-stripping all thumbs: 127MB
• After thumb-stripping AND resource-stripping: 79MB!
• After then opening that folder in a GraphicConverter browser window so that new thumbs are attached in accordance with the settings you see above: 85MB
So, stripping the resources and reattaching sane thumbs gives the user a 50% storage savings. Not bad!
posted by squirrel at 11:42 AM on February 24, 2006
This thread is closed to new comments.
posted by evariste at 11:57 AM on February 23, 2006