You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by "Simon MacDonald (JIRA)" <ji...@apache.org> on 2012/07/05 15:39:34 UTC
[jira] [Created] (CB-1008) Camera with targetHeight, targetWidth
loses image aspect ratio
Simon MacDonald created CB-1008:
-----------------------------------
Summary: Camera with targetHeight, targetWidth loses image aspect ratio
Key: CB-1008
URL: https://issues.apache.org/jira/browse/CB-1008
Project: Apache Cordova
Issue Type: Bug
Components: Android
Affects Versions: 1.9.0
Reporter: Simon MacDonald
Assignee: Simon MacDonald
Using Camera on Android (2.2.x) with PhoneGap 1.9.0, and setting the targetHeight and targetWidth results in an image resized to these dimensions, losing aspect ratio. I'd expected the image to resize to fit within target size, maintaining aspect ratio.
For example: an image originally 2000 x 3000 px with targetHeight = 600, targetWidth = 600 returns a 600 x 600 px image instead of a 400 x 600 px image.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CB-1008) Camera with targetHeight, targetWidth
loses image aspect ratio
Posted by "Barry vd. Heuvel (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13407305#comment-13407305 ]
Barry vd. Heuvel commented on CB-1008:
--------------------------------------
I can also confirm, this breaks my app from updating 1.8.1 to 1.9.0. Only setting targetWidth = 800, results in a 800x1 image, instead of an 800x(Y-ratio) image. When width and height are set, image is malformed, instead of cropped/fitting.
> Camera with targetHeight, targetWidth loses image aspect ratio
> --------------------------------------------------------------
>
> Key: CB-1008
> URL: https://issues.apache.org/jira/browse/CB-1008
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.9.0
> Reporter: Simon MacDonald
> Assignee: Simon MacDonald
>
> Using Camera on Android (2.2.x) with PhoneGap 1.9.0, and setting the targetHeight and targetWidth results in an image resized to these dimensions, losing aspect ratio. I'd expected the image to resize to fit within target size, maintaining aspect ratio.
> For example: an image originally 2000 x 3000 px with targetHeight = 600, targetWidth = 600 returns a 600 x 600 px image instead of a 400 x 600 px image.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CB-1008) Camera with targetHeight, targetWidth
loses image aspect ratio
Posted by "Simon MacDonald (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CB-1008?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon MacDonald resolved CB-1008.
---------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0
I have fixed this issue. The Android method does not maintain the aspect ratio so I re-instated the code we previously used to determine the proper aspect ratio.
My earlier tests were stupidly using a width/height that approximated a good aspect ratio so the image looked correct. Mea culpa.
> Camera with targetHeight, targetWidth loses image aspect ratio
> --------------------------------------------------------------
>
> Key: CB-1008
> URL: https://issues.apache.org/jira/browse/CB-1008
> Project: Apache Cordova
> Issue Type: Bug
> Components: Android
> Affects Versions: 1.9.0
> Reporter: Simon MacDonald
> Assignee: Simon MacDonald
> Fix For: 2.0.0
>
>
> Using Camera on Android (2.2.x) with PhoneGap 1.9.0, and setting the targetHeight and targetWidth results in an image resized to these dimensions, losing aspect ratio. I'd expected the image to resize to fit within target size, maintaining aspect ratio.
> For example: an image originally 2000 x 3000 px with targetHeight = 600, targetWidth = 600 returns a 600 x 600 px image instead of a 400 x 600 px image.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira