• 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: Thread safe?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Thread safe?


  • Subject: Re: Thread safe?
  • From: glenn andreas <email@hidden>
  • Date: Sun, 30 Mar 2008 15:35:16 -0500


On Mar 30, 2008, at 3:21 PM, Trygve Inda wrote:


Or drop down just a step to just use NSBitmapImageRep instead of
NSImage which avoids all the caching issues (since you never make an
NSImage).  It is very well suited for "pixel level work that is saved
in a file" (since you'll need it to do NSBitmapImageRep's
representationUsingType: properties: to get the data for a JPG or PNG
file anyway).

I am not using NSImage - except to draw an existing file into my premade
NSBitmapImageRep. Is there a way to draw a jpg into this NSBitmapRep without
loading the jpg into an NSImage?



Yes - NSBitmapImageRep's can be init'ed with NSData (the contents of a jpg) and being a subclass of NSImageRep, can be drawn using drawAtPoint or drawInRect.



_______________________________________________

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


References: 
 >Re: Thread safe? (From: Trygve Inda <email@hidden>)

  • Prev by Date: Re: Thread safe?
  • Next by Date: Re: How to set color file labels?
  • Previous by thread: Re: Thread safe?
  • Next by thread: how to check if a property is empty?
  • Index(es):
    • Date
    • Thread