Photo taken with camera appear the wrong way up?

5 posts, 0 answers
  1. Chris
    Chris avatar
    14 posts
    Member since:
    Oct 2012

    Posted 31 Mar 2013 Link to this post

    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.. 
  2. Steve
    Admin
    Steve avatar
    10941 posts

    Posted 01 Apr 2013 Link to this post

    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.
  3. Chris
    Chris avatar
    14 posts
    Member since:
    Oct 2012

    Posted 04 Apr 2013 Link to this post

    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 });
  4. Chris
    Chris avatar
    14 posts
    Member since:
    Oct 2012

    Posted 04 Apr 2013 Link to this post

    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
  5. Jason
    Jason avatar
    21 posts
    Member since:
    Apr 2013

    Posted 27 May 2013 Link to this post

    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.
Back to Top