iPad 2 - Picture Orientation Issue

220 views
Skip to first unread message

Nick

unread,
Jul 6, 2012, 11:01:08 AM7/6/12
to rhom...@googlegroups.com
Hi,

I'm having picture orientation issues when using the camera on my iPad 2. The saved pictures are not oriented correctly when displayed in full screen mode using PhotoSwipe for example. Test system:

iPad 2 with iOS 5.1.1
Rhodes 3.3.3 + Ruby 1.9.3 on Mac OS X 10.7.4
XCode 4.3.3 - iOS SDK 5.1 (Target iOS SDK 4.2).

If I use the following code, the pictures are not oriented correctly:

settings = {:enable_editing => false, :desired_width => 800, :desired_height => 800}
Camera::take_picture(url_for(:action => :camera_callback_new), settings)

Picture taken holding the iPad in Portrait Mode. The orientation in the EXIF is Orientation 6 Rotated 90 degrees CCW. This picture should not be rotated.

Picture taken holding the iPad in Landscape Mode (Rotated clockwise 90 degrees). The orientation in the EXIF is Orientation 3 Rotated 180 degrees. This picture should not be displayed flipped 180 degrees.


If I use the following code, the pictures are oriented correctly:

settings = {:enable_editing => true}
Camera::take_picture(url_for(:action => :camera_callback_new), settings)

Picture taken holding the iPad in Portrait Mode. The orientation in the EXIF is Orientation 1 Normal. This picture displays correctly.

Picture taken holding the iPad in Landscape Mode (Rotated 90 degrees clockwise). The orientation in the EXIF is Orientation 1 Normal. This picture displays correctly.

I would like to not use ":enable_editing => true" so that I can save higher resolution pictures. Anyone know why this is happening?

Thanks,

Nick,

Nick

unread,
Aug 10, 2012, 10:15:07 AM8/10/12
to rhom...@googlegroups.com
I fixed this problem by using the UIImage+Resize class extension. I submitted a pull request to rhodes. Hopefully it will be integrated. This problem apparently affects all iOS devices.


Nick,
Reply all
Reply to author
Forward
0 new messages