cordova-issues mailing list archives

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


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:
>             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
(calculateAspectRatio) inside Android version of Camera plugin.

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message