开发者

Why are some of the photos from my iphone is rotated when I display it on the computer?

I use some test images for my iphone app, and the app mysterious breaks when it shouldn't. I finally opened up the photo with an image viewer and noticed that the photos are rotated. I did not开发者_如何学C expect this at all.

How do I know an image is rotated?


UIImage has an imageOrientation property. That returns the orientation defined in the image's metadata or UIImageOrientationUp as a default.

But really, if your app breaks because of the orientation, you might be doing some things in a way you shouldn't do.. (can't remember how often i got EXEC_BAD_ACCESS oO) i suggest running leaks / zombie instruments with the xcode profiling feature.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜