I used CGImageGetDataProvider and CGDataProviderCopyData and then get a pointer to the data. The first image I tested was a bmp and this method worked great. However, I changed my image to a JPG because I had read something about the Data Provider possibly being relative to the type of image. The length of that data returned indicates that it is 4 when it should be some large number representing the rows and columns of the image.
What I need is I can ask for the Data Provider to be for a bitmap so I can walk through the data uncompressed?
The data you get out of the data provider will be the data that went into creating the image. For instance, if the image was created using
CGImageCreateWithJPEGDataProvider, it would be JPEG data. If you want bitmap data, you will need to make a bitmap, perhaps usingCGBitmapContextCreate, and draw the image into the bitmap.