• 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: File sizes when NSImage's are included
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: File sizes when NSImage's are included


  • Subject: Re: File sizes when NSImage's are included
  • From: matt neuburg <email@hidden>
  • Date: Mon, 29 Dec 2003 15:43:31 -0800

On Mon, 29 Dec 2003 15:23:34 +0000, Nicko van Someren <email@hidden> said:
>Apparently not. I sent a mail to this list a few days ago trying to
>find out how to retrieve the original data from which the NSImage came
>but I've not seen any replies to the post.
>
>> add a goodly amount of compression,
>> and then make all images no taller than 200 pixels. And yet, I'm still
>> getting filesize increases of 500k for a simple 20k picture.
>
>That's because the serialisation of the NSImageRep still contains
>enough data to rebuild the object without data loss.

You might want to look at the strategy employed by TextEdit - namely, just to
save a copy of the image file, itself, within the document. There is then no
loss of file format (because you've got the file itself, not merely a
disembodied NSImage), and there is nothing to serialize. This approach is
straightforward because you can save a document as a package (like TextEdit's
.rtfd format). m.
--
matt neuburg, phd = email@hidden, http://www.tidbits.com/matt/
pantes anthropoi tou eidenai oregontai phusei
AppleScript: the Definitive Guide! NOW SHIPPING...! (Finally.)
http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt
Subscribe to TidBITS! It's free and smart. http://www.tidbits.com/
_______________________________________________
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.

  • Prev by Date: Re: NSImageView frames
  • Next by Date: handling of huge bitmaps, incremental saving?
  • Previous by thread: Re: File sizes when NSImage's are included
  • Next by thread: Re: File sizes when NSImage's are included
  • Index(es):
    • Date
    • Thread