Uploading camera images - portrait orientation

72 views
Skip to first unread message

jfb_1973

unread,
Aug 18, 2010, 5:11:04 PM8/18/10
to phonegap
Hello all,

I'm using the camera api in my app in a way similiar to how it's
demonstrated in the wiki on this page -

http://phonegap.pbworks.com/Image-Upload-using-JQuery-and-Python

In my case the image data is copied from the camera or photo roll,
onto a small 60x60 image on the page. It works great, the image is the
correct orientation and all is well. I then copy the image data into a
hidden field and when the form is submitted I post the base64 encoded
string to my server, where it is decoded and written as a file in my
asp.net application.

The problem is that the orientation of the uploaded images is
inconsistent depending on whether or not the photo was taken in
portrait or landscape mode. Landscape images look ok, but photos taken
in portrait mode are rotated to the right 90 degrees.

Anyone know what the issue might be?

Also, I have the accelerometer disabled if that helps clarify things.

Thanks

Jesse MacFadyen

unread,
Aug 18, 2010, 5:47:58 PM8/18/10
to jfb_1973, phonegap
The Image library on the server should contain methods for determining the orientation of the image from the data.  There is addition meta in the encoded data that indicates which way is up.


--
You received this message because you are subscribed to the Google
Groups "phonegap" group.
To post to this group, send email to phon...@googlegroups.com
To unsubscribe from this group, send email to
phonegap+u...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/phonegap?hl=en?hl=en

For more info on PhoneGap or to download the code go to www.phonegap.com



--
--
Jesse MacFadyen
{
  blog:'blogs.nitobi.com/jesse',
  email:'jesse.m...@nitobi.com',
  company:
  {
    name:'Nitobi Software',
    site:'www.nitobi.com',
    phone:
    {
      office:'+1 (604) 685-9287',
      tollFree:'1-866-632-2777'
     }
  }
}
Reply all
Reply to author
Forward
0 new messages