• 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: Image expands with compression
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Image expands with compression


  • Subject: Re: Image expands with compression
  • From: Marcel Weiher <email@hidden>
  • Date: Sun, 9 May 2004 10:18:34 +0100

A note here: you generally don't want to decompress and recompress JPEG images, as they will lose quality each time they are compressed. So unless you are processing the image and want to save the changes, you probably want to keep the original JPEG data around and re-save that instead of recompressing the image data.

Marcel

On 9 May 2004, at 00:00, Scott Ahten wrote:

Lorenzo,

I think this is what your looking for...

http://www.cocoadev.com/index.pl?NSImageToJPEG

- Scott


On May 8, 2004, at 6:13 PM, Lorenzo wrote:

Hi,
I read a jpg file (76 KB only)
image = [[NSImage alloc] initWithContentsOfFile:filePath];
then I save it immediately with
[image TIFFRepresentationUsingCompression:
NSTIFFCompressionLZW factor:15.0];
and it grows to 812 KB !?!

Now as written in the header file "NSBitmapImageRep.h", the
NSTIFFCompressionJPEG compression is not longer supported.
So, how can I save my 76 KB image with a smart compression?


--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.
1d480c25f397c4786386135f8e8938e4
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


References: 
 >Image expands with compression (From: Lorenzo <email@hidden>)
 >Re: Image expands with compression (From: Scott Ahten <email@hidden>)

  • Prev by Date: Re: Image expands with compression
  • Next by Date: Re: Are immutable singletons thread safe?
  • Previous by thread: Re: Image expands with compression
  • Next by thread: Custom Frameworks, building and using
  • Index(es):
    • Date
    • Thread