Re: Debugging "CGImageCreate: invalid image provider: NULL"?
Re: Debugging "CGImageCreate: invalid image provider: NULL"?
- Subject: Re: Debugging "CGImageCreate: invalid image provider: NULL"?
- From: Graham Cox <email@hidden>
- Date: Mon, 01 Aug 2011 11:11:06 +1000
On 01/08/2011, at 10:44 AM, Izak van Langevelde wrote:
> I get this error when using CGImageCreate to recreate an image from the bytes I previously got from the image. A quick comparison shows that the amount of bytes is the same, the bytes are the same, and the various parameters of CGImageCreate correspond to the original image, so I'm running out of options.
>
> Could someone out there suggest what "CGImageCreate: invalid image provider: NULL" means?
Are you passing the bytes (or CFData) to the 'data provider' parameter? If so, that's wrong - you need to pass a CGDataProviderRef. Create one using CGDataProviderCreateWithData or CGDataProviderCreateWithCFData, depending on what form your bytes are in.
If you're already doing this, you'll need to show your code.
--Graham
_______________________________________________
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