GPUImage icon indicating copy to clipboard operation
GPUImage copied to clipboard

GPUImagePicture from AssetsLibrary loads upside down

Open brspurri opened this issue 14 years ago • 4 comments

Just as the title says, when I load a UIImage that's been taken with the iPhone camera app into GPUImagePicture, it displays upside down. Has anyone else seen this?

However, if I capture an image from the GPUImageStillCamera, and then load it into a separate GPUImagePicture, it displays in the correct orientation.

However, It appears that the orientation flag in the UIImage for both are identical.

Has anyone found a solution to this?

Cheers, Brett

brspurri avatar Jul 10 '12 20:07 brspurri

I have also seen this while diving into the code and it seems that the noRotationTextureCoordinates[] is the culprit. This feature is defined in two different classes.

GPUImageFilter.m GPUImageView.m

Both of which have two different matrixes/multidimensional arrays defined. One of which results in an upside down image. Altering this has solved the problem in the source code. However, modifying the source code of a library is not all that appealing.

Hope this helps track down the issue that I believe is related to the first users issue.

colortheorydeveloper avatar Jul 12 '12 13:07 colortheorydeveloper

I'm having the same issue. Is there a solution?

peterhwong avatar Jul 24 '12 03:07 peterhwong

This fixed the problem for me:

http://stackoverflow.com/questions/5427656/ios-uiimagepickercontroller-result-image-orientation-after-upload

peterhwong avatar Jul 24 '12 18:07 peterhwong

Above solution is for UIImage, please suggest a solution for video too for Swift GPUImage2

Jane930525 avatar Jun 14 '18 07:06 Jane930525