Re: Debugging "CGImageCreate: invalid image provider: NULL"?
Re: Debugging "CGImageCreate: invalid image provider: NULL"?
- Subject: Re: Debugging "CGImageCreate: invalid image provider: NULL"?
- From: Izak van Langevelde <email@hidden>
- Date: Sun, 31 Jul 2011 21:25:51 -0400
On 2011-07-31, at 9:11 PM, Graham Cox wrote:
>
> 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.
I'm creating one with CGDataProviderCreateSequential, using callbacks.
---
Grinnikend door het leven...
_______________________________________________
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