On 30 Mar '08, at 8:34 AM, Trygve Inda wrote:

How did you work around this?

Basically I am opening a bitmap drawing an NSImage into it, then pixel-level
tweaking the bitmap, and saving it to disk as a jpg.

You might want to drop down a level and use CGImage for your bitmap. CG is stateless (the graphics context is passed in to every drawing call) and doesn't do the types of offscreen caching that NSImage does, so it's more likely to be thread-safe.

You can use Cocoa graphics calls to draw into GCImages ... the recipe was discussed here in the last week or two, though I don't remember the details. You need to get a CG graphics context for drawing into the image, then make it the current NSGraphicsContext. (The books on Quartz 2D graphics probably discuss this too.)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

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 [EMAIL PROTECTED]

Reply via email to