Johan Gustafsson created CB-11536:
-------------------------------------

             Summary: Retrieving image using PHOTOLIBRARY with set 
targetWidth/targetHeight does not always respect set width/height values.
                 Key: CB-11536
                 URL: https://issues.apache.org/jira/browse/CB-11536
             Project: Apache Cordova
          Issue Type: Bug
          Components: Plugin Camera
         Environment: iOS
            Reporter: Johan Gustafsson


I am currently having issues with the cordova-plugin-camera on iOS. Sometimes 
when I open a picture from the phone gallery using PHOTOLIBRARY variable, 
allowEdit as true and have the targetWidth/targetHeight set it returns an 
incorrectly sized image.

In my current application I need all my pictures in a 1:1 ratio with the 
width/height set to 400. However, sometimes when the image is returned from 
getPicture one of the sizes are off. For example, the width might be 400px but 
the height is oddly enough set to 398. 

>From what I have managed to deduce it can be caused when someone is 
>editing/cropping the selected picture and the area of the cropping area is 
>outside or bigger than the picture itself. So if someone is editing/cropping 
>and have dragged the cropping outside the boundaries of the image and is to 
>quick to hit Choose before the cropping area has snapped back inside the image 
>area the returned image is not correctly sized(this does not happen everytime 
>but I was able to quite reliably reproduce it). Furthermore if the image is 
>smaller than the set targetWidth/targetHeight(in my case, an image of size 
>400x300) the plugin will just return the image as is, this is understandable 
>but maybe it could instead return a letterboxed/pillarboxed image of the 
>correct size? 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to