Re: Bulletproof way to create a new CGBitmapContext from an existing image?
Re: Bulletproof way to create a new CGBitmapContext from an existing image?
- Subject: Re: Bulletproof way to create a new CGBitmapContext from an existing image?
- From: David Duncan <email@hidden>
- Date: Tue, 3 Nov 2009 09:10:48 -0800
On Nov 1, 2009, at 8:45 AM, email@hidden wrote:
I'm trying to write code to avoid messages such as this:
<Error>: CGBitmapContextCreate: unsupported parameter combination: 8
integer bits/component; 16 bits/pixel; 1-component colorspace;
kCGImageAlphaPremultipliedFirst; 352 bytes/row.
I only rarely get these now, but I want to make that "never". I'm
pasting my code below that I have so far - can anyone suggest
something better? (I'm working on an iPhone if it makes any
difference.)
Do you need to match the source image so closely? In most situations
it is perfectly acceptable to just flatten all images down to a single
canonical format for your application rather than trying to base the
final image format on the source image format. About the only thing I
may consider doing is differentiating Grayscale/RGB/CMYK source
images, but I would want specific reasons for going beyond that.
--
David Duncan
Apple DTS Animation and Printing
_______________________________________________
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