• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: NSBitMapRepresentation --> JPEG compression?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBitMapRepresentation --> JPEG compression?


  • Subject: Re: NSBitMapRepresentation --> JPEG compression?
  • From: Marco S Hyman <email@hidden>
  • Date: Mon, 29 Jun 2009 23:24:32 -0700

On Jun 29, 2009, at 4:12 PM, Chris Tracewell wrote:

The issue is that when using writeToFile my images have an extra 3 to 10 KB of size whether the image is really small or really big - ie 5KB or 300KB. I am suspecting that my XCode generated images are bigger for one of two reasons...

1) Adobe's JPEG compression is just plain better and unless I develop my own JPEG compression algorithm I am hosed.
2) My Objective-C created images contain extra file meta data / headers that are inflating the size a bit

Possible. Grab a copy of exiftool and run it against a both a photoshop image and one saved using your method. It will tell you what metadata is in each image.

I know that very old versions of photoshop would not save the
exif/iptc/whatever metadata which annoyed me no end as I find
the info quite worthwhile to have around.  On the other hand,
my "prepare images for web page" script makes a point of stripping
everything out of thumbnail images.

If you can't figure out how to do it in your app take a look
at jhead.   Your app could call "jhead -se -purejpg <filename>"
to do the job for you.

// marc
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: NSBitMapRepresentation --> JPEG compression?
      • From: Chris Tracewell <email@hidden>
    • Re: NSBitMapRepresentation --> JPEG compression?
      • From: Chris Tracewell <email@hidden>
    • Re: NSBitMapRepresentation --> JPEG compression?
      • From: Rob Keniger <email@hidden>
References: 
 >NSBitMapRepresentation --> JPEG compression? (From: Chris Tracewell <email@hidden>)

  • Prev by Date: Input for CIFilter
  • Next by Date: Re: NSBitMapRepresentation --> JPEG compression?
  • Previous by thread: NSBitMapRepresentation --> JPEG compression?
  • Next by thread: Re: NSBitMapRepresentation --> JPEG compression?
  • Index(es):
    • Date
    • Thread