• 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: Bulletproof way to create a new CGBitmapContext from an existing image?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Bulletproof way to create a new CGBitmapContext from an existing image?
      • From: Demitri Muna <email@hidden>
References: 
 >Bulletproof way to create a new CGBitmapContext from an existing image? (From: email@hidden)

  • Prev by Date: Re: How to imitiate mouse move programmatically? [NSApp postEvent:atStart:] does not work...
  • Next by Date: NSTreeController insert crashes under 10.5 and not 10.6 with -[NSKeyValueFastMutableArray2 count]: value for key children of object is nil
  • Previous by thread: Bulletproof way to create a new CGBitmapContext from an existing image?
  • Next by thread: Re: Bulletproof way to create a new CGBitmapContext from an existing image?
  • Index(es):
    • Date
    • Thread