cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Max Woghiren <>
Subject Re: Camera API
Date Wed, 28 Aug 2013 14:14:18 GMT
I would expect, if anything, that specifying only one of the two dimensions
would be desired.  I'm guessing one overrides the other if both are
specified but don't conform to the aspect ratio; that should probably be in
the docs.

On Wed, Aug 28, 2013 at 10:04 AM, James Jong <> wrote:

> You're right that it could be calculated based on one or the other.  The
> code expects both today.  I think the point is to be clear that the aspect
> ratio is maintained, so that the user does not expect to be able to
> arbitrarily set both.
> -James Jong
> On Aug 28, 2013, at 7:15 AM, John Wargo <> wrote:
> > I've got another silly question. In looking at the Camera API, I see the
> following:
> >
> > targetWidth: Width in pixels to scale image. Must be used with
> targetHeight. Aspect ratio remains constant. (Number)
> >
> > targetHeight: Height in pixels to scale image. Must be used with
> targetWidth. Aspect ratio remains constant. (Number)
> >
> > I'm not getting why targetWidth MUST be used with targetHeight (and visa
> versa) when aspect ratio remains constant. If aspect ratio remains
> constant, then setting one automatically forces the other - that's the
> whole point of maintaining aspect ratio, right? If the API is maintaining
> aspect ratio while sizing the image, then forcing the developer to specify
> both parameters is simply wasted work.
> >
> > What am I missing here?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message