Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Reduce file size of images exported through iPhoto Apps

For a while now I've been mildly irritated at the JPG files iPhoto's export feature produces. They've always seemed way to large, and I just chalked it up to poor JPEG compression routines. Since this is a hint, you must already realize I was wrong. It turns out my images had embedded IPTC profiles (short version: image metadata). I'm not sure if my camera or iPhoto embedded the profiles, but I wish iPhoto were smart enough to strip this out when you export, particularly when you export for use on the web.

Fortunately, ImageMagick comes to the rescue again. You can strip the IPTC profiles from an image by using the mogrify command:


mogrify +profile iptc filename.jpg

The reduction in file size varies, but I've shed anywhere from 20KB to 100KB from an image.

    •    
  • Currently 2.67 / 5
  You rated: 5 / 5 (6 votes cast)
 
[17,824 views]  

Reduce file size of images exported through iPhoto | 12 comments | Create New Account
Click here to return to the 'Reduce file size of images exported through iPhoto' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
I Don't Think It's iPhoto
Authored by: escowles on Aug 05, '03 11:07:37AM

I don't think it's iPhoto -- I tried this out on some images I exported and there was no difference at all. I tried both images from my digital camera (Ricoh Caplio) and scans from Photoshop.

I'd guess it was the camera adding the IPTC metadata to the images -- there may be a setting for that in your camera.

-Esme



[ Reply to This | # ]
I Don't Think It's iPhoto
Authored by: Edward Brown on Aug 05, '03 01:19:08PM

Another good program for this is graphicConverter. It's possible to process an entire folder of images and remove all the embedded profiles at once (for jpeg, you can remove IPTC, Comments, EXIF, ICC and sRGB) plus remove the icon preview. Big savings are possible, especially for smaller images.



[ Reply to This | # ]
Almost certainly the camera.
Authored by: notmatt on Aug 05, '03 01:00:07PM

Of the three digital cameras I've owned, one hasn't had profiles, and the other two offer a choice, but no way to disable them. If iPhoto wasn't such a goat with the amount of photos I have, it would be nice to know it doesn't trash the profile.



[ Reply to This | # ]
Reduce file size of images exported through iPhoto
Authored by: VHDLBigot on Aug 05, '03 01:51:50PM

When I first tried to use the .mac account's photo album ability I had a similar problem. I barely noticed the overhead of the metadata in the "full size" images, but when .mac made thumbnails, they were still huge due to the metadata. Thumbnails should be 3-6KB otherwise what's the point? With the metadata included in the thumbnail images, the .mac album thumbnail album overview took FOREVER to load. So yes, either use a tool like Imagemagik's mogrify to strip the metadata or be sure in Photoshop [Elements] to do a Save for Web. Otherwise your thumbnails images will be 90% metadata bloat.

Of course, consider what JPEG quality factor is acceptable for what you are doing. I usually find the 70% or so is fine for the average picture that's destined for on screen viewing only.

With these considerations, the thumbnail is usually around 4K with larger full screen versions running 30KB-70KB. Using Javascript you can program the users browser to prefetch the next picture while they are admiring the current shot -- further speeding up the perceived browsing time.

---
Scott
BilikFamily.com



[ Reply to This | # ]
Reduce file size of images exported through iPhoto
Authored by: pheed on Aug 05, '03 03:55:42PM
I bumped headlong into this problem long before I started dealing with iPhoto. In fact I'm convinced that this metadata is added into .jpg files by OS X itself.

For example: when my daughter was born, the hospital posted photos of her online. Each .jpg was no larger than 35 KB. I viewed these images using Internet Explorer and then saved them to my desktop. Surprise! Now each picture was 100+ KB! It's something the OS itself was adding in. The only way I've found around this is to save the picture using Photoshop...see comment above.

[ Reply to This | # ]

Reduce file size of images exported through iPhoto
Authored by: mj on Aug 05, '03 06:48:47PM

Hey Pheed. I just tested this with IE: an otherwise 9k jpg had 150k extra data added to it. In this case, it's IE adding the extra data, in the form of a resource fork. That's different metadata than this hint is referring to, which is embedded information in the data fork. There are hints on this site about how to get rid of resource forks that will take care of the problem you were having.

Michael



[ Reply to This | # ]
Reduce file size of images exported through iPhoto
Authored by: jrigby on Aug 05, '03 04:58:06PM

I believe 'mogrify +profile "*" *' will get rid off ALL extraneous jpeg data. Could be wrong though.



[ Reply to This | # ]
Color correction data?
Authored by: paulio on Aug 05, '03 11:11:30PM

Won't this also remove all the color profiles for color correction? That might be ok for thumbnails, but might not be ok for larger pictures.



[ Reply to This | # ]
Reduce file size of images exported through iPhoto
Authored by: jan-willem on Aug 06, '03 11:30:19AM

what kind of info is stored in this image metadata???

---
Get a life, get a Mac



[ Reply to This | # ]
Reduce file size of images exported through iPhoto
Authored by: rushmoom on Aug 07, '03 11:42:29AM

When I first read this hint I wanted to kick myself for not knowing this sooner. It wasn't more than a few minutes before I had apt-get'd my way to image optimization bliss. The files sizes of the photos in my online photoalbums was nearly halved!

Then, as I looked through them I thought to myself "I don't remember my photos looking this crappy." An a/b comparison proved my fear - imagemagick was doing more than removing profile info.

My assumption is that it's also affecting the "quality" of the image, perhaps setting it to the default, 75%. I tried setting the quality to 100%, but that only increased the file sizes (most of my images are around 90%).

I have no idea why the quality would be affected without specifying the quality arg. A look at the man page and some cursory tests didn't reveal anything to me.

I'd love to see if anybody has any additional insight?



[ Reply to This | # ]
Reduce file size of images exported through iPhoto
Authored by: jim3e8 on Oct 13, '03 07:33:21PM

This is an old thread, but I hope this comment will be seen.

convert and mogrify will recompress your image, no matter what options you give it; AFAIK you can't get around it. So, the majority of the 20-100K savings people are getting probably come from reducing the iPhoto exported image from quality 95+, to the imagemagick default of 75. Quality 100 does reduce picture quality, by the way. I think this is a misfeature [you can't even add a comment without losing image quality].

You can check the actual size of the profile data with 'identify -verbose filename.JPG'.



[ Reply to This | # ]
Reduce file size of images exported through iPhoto
Authored by: SimpleSimon on Jul 13, '08 11:42:51PM

In the toolbar (top of the screen) is the Share command button.

first select the photo/photos by clicking once on one, or by pressing the apple key and clicking each photo if you want to resize multiple pics.

On the tool bar, click on Share and choose export. Since you want a lower file size, you might have to experiment a bit.
First choose the format, ex: jpeg

Click on the the Scale images no larger than: radio button and type in a size like 640 in the left window (a number should appear on the right window) usually it's 427
So, you have 640X427 for landscape... then click Export, at the next window, you can change the file name and location for the file.

Hope that helps.



[ Reply to This | # ]