Thanks for the exiftool pointer - very nice utility. There is indeed about 2KB of extra Header info in the Apple JPEG - mostly ICC profile info. There is also some subsampling differences as the Apple default is using 4:2:0 and Adobe is using 4:4:4 which may play a factor in quality.

2KB?  I see about 3K of color management info. If your images are sRGB
or can be converted to sRGB you can likely get away with stripping
that away.  Especially since most browsers aren't color managed
according to this page:

http://www.gballard.net/psd/go_live_page_profile/embeddedJPEGprofiles.html

One way to get rid of the info:

    NSTask *jhead = [[NSTask alloc] init];

    [jhead setStandardOutput: [NSFileHandle fileHandleWithNullDevice]];
    [jhead setStandardError: [NSFileHandle fileHandleWithNullDevice]];
    [jhead setLaunchPath: @"/path/to/jhead"];
    [jhead setArguments:[NSArray arrayWithObjects: @"-se", @"-purejpg",
                            pathToYourImage, nil]];
    [jhead launch];

etc.

Here's an example of image sizes before and after stripping of
a 181x120 thumbnail:

original: 13821 Jun 30 11:35 t-20090620-1110-5341.jpg
stripped:  9647 Jun 30 11:35 t-20090620-1110-5341.jpg

/\/\arc

_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to