Hello,

Leopard introduced a new NSBitmapImageRep attribute 
NSImageFallbackBackgroundColor. I often use it in my applications. Now in Snow 
Leopard this option does not work anymore. Also the equivalent option in the 
ImageIO framework kCGImageDestinationBackgroundColor is useless. Here is some 
code:

NSData *dt = [mBitmapRep representationUsingType:NSJPEGFileType 
properties:[NSDictionary dictionaryWithObjectsAndKeys:[NSNumber 
numberWithFloat:0.7], NSImageCompressionFactor, [NSColor blackColor], 
NSImageFallbackBackgroundColor, nil]];

[dt writeToFile:@"MyImage.jpg" atomically:NO];

I need a black fallback color, not the white default background color.

Any ideas? Thank you.

Jakob

_______________________________________________

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 arch...@mail-archive.com

Reply via email to