CGDataProvider works the first time, returns an empty image the second time
问题 I am trying to read the ARGB pixel data from a png image asset in my ios App. I am using CGDataProvider to get a CFDataRef as described here: http://developer.apple.com/library/ios/#qa/qa1509/_index.html It works perfectly the first time I use it on a certain image. But the second time I use it on THE SAME image, it returns a length 0 CFDataRef. Maybe I am not releasing something? Why would it do that? - (GLuint)initWithCGImage:(CGImageRef)newImageSource { CGDataProviderRef dataProvider;