This is a migrated thread and some comments may be shown as answers.

Photo taken with camera appear the wrong way up?

4 Answers 104 Views
Apache Cordova
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris
Top achievements
Rank 1
Chris asked on 31 Mar 2013, 06:36 PM
I've taken a photo with the camer but when I set the image data to be the src of an image element it appears on its side. I upload it to a server and it displays correctly. I suspect it is something stupid I am doing.. 

4 Answers, 1 is accepted

Sort by
0
Steve
Telerik team
answered on 01 Apr 2013, 01:03 PM
Hi Chris,

Try adding "correctOrientation: true," to the options for "navigator.camera.getPicture", for more information refer to the Cordova Camera Api.

All the best,
Steve
the Telerik team

Share feedback and vote for features on our Feedback Portal.
Want some Kendo UI online training - head over to Kendo UI Dojo.
0
Chris
Top achievements
Rank 1
answered on 04 Apr 2013, 08:06 PM
Hi try this and it complete crashes the app. Is there something wrong with my syntax

navigator.camera.getPicture(onPhotoDataSuccess, onPhotoDataFail, { quality: 50, correctOrientation: true });
0
Chris
Top achievements
Rank 1
answered on 04 Apr 2013, 08:23 PM
Hi I think I got to the bottom of this orientation feature seems to crash my phone unless I resize the image to a reasonable size e.g.

navigator.camera.getPicture(onPhotoDataSuccess, onPhotoDataFail, { quality: 50, correctOrientation: true, targetWidth: 750, targetHeight: 750 });

Makes my app a lot quicker
0
Jason
Top achievements
Rank 1
answered on 28 May 2013, 12:45 AM
This approach works well as long as you don't care about image quality. That is, you will only ever view the image on the device.

you will find if you view the images on a desktop that you sacrifice image quality for reduction in size.
Tags
Apache Cordova
Asked by
Chris
Top achievements
Rank 1
Answers by
Steve
Telerik team
Chris
Top achievements
Rank 1
Jason
Top achievements
Rank 1
Share this question
or