1

I'm using GLKTextureLoader to load images from the photo roll, but any time an image that was shot in portrait aspect ratio is loaded, it ends up being treated as a landscape aspect image, rotated 90 degrees off.

I believe the UIImage from the photo roll will need to be rotated and redrawn using Quartz, but I don't really know where to begin. I thought I might be able to modify the popular UIImage+Resize.h library, but when I try to load a UIImage that has been simply resized with that library, the GLKTextureLoader fails, suggesting to me that some information it relies on is lost in the process.

Aaron
  • 11
  • 1
  • actually I've found that the reason it fails is specifically because of this error: The operation couldn’t be completed. (GLKTextureLoaderErrorDomain error 12.) This is because the pixel format is incompatible with GLKTextureLoader. The documentation lists several pixel formats which it works with. The strange thing is that when these libraries setup their CGContext, they use the pixel format of the file itself! – Aaron Nov 06 '12 at 22:48

0 Answers0