cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard B Knoll (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-8913) [Windows] Camera picture can be out of shape when resized
Date Fri, 16 Oct 2015 23:54:05 GMT

    [ https://issues.apache.org/jira/browse/CB-8913?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14961549#comment-14961549
] 

Richard B Knoll commented on CB-8913:
-------------------------------------

When you say out of shape, are you referring to the wrong orientation? That is, landscape
photos appearing in portrait and vice versa? Or, are you referring to the width/height not
matching what you put in the camera options? targetWidth and targetHeight don't actually specify
the size of an image. Instead, it is easier to think of them as specifying a maximum bounding
box for the image to fit in (aspect ratio is always maintained and images will not be scaled
up). For example, specifying  {{targetWidth:1000}} and {{targetHeight:1000}} and inserting
a 200x200 image would result in a 200x200 image in your app. Conversely, specifying {{targetWidth:100}}
and {{targetHeight:200}} for that same image will make the image in your app be 100x100 (it
is constrained by the lower dimension).

If that isn't your issue, Would you mind posting some of the code you are using?

> [Windows] Camera picture can be out of shape when resized
> ---------------------------------------------------------
>
>                 Key: CB-8913
>                 URL: https://issues.apache.org/jira/browse/CB-8913
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Android, Plugin Camera
>    Affects Versions: 3.4.0
>            Reporter: Olivier VERMONT
>              Labels: camera, out_of_shape, ratio, resize
>
> When targetHeight and/or targetWidth are used, depending on landscape/portrait mode,
resulting picture can be completly out of shape. 
> There is something to do concerning aspect ratio as it is done in CameraLauncher.java
(calculateAspectRatio) inside Android version of Camera plugin.



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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message