Return-Path: X-Original-To: apmail-cordova-dev-archive@www.apache.org Delivered-To: apmail-cordova-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 92DEE106D8 for ; Tue, 17 Dec 2013 01:30:56 +0000 (UTC) Received: (qmail 28393 invoked by uid 500); 17 Dec 2013 01:30:56 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 28343 invoked by uid 500); 17 Dec 2013 01:30:56 -0000 Mailing-List: contact dev-help@cordova.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cordova.apache.org Delivered-To: mailing list dev@cordova.apache.org Received: (qmail 28335 invoked by uid 99); 17 Dec 2013 01:30:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 01:30:56 +0000 X-ASF-Spam-Status: No, hits=2.0 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,URIBL_RHS_DOB X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of jwargo23@gmail.com designates 209.85.213.51 as permitted sender) Received: from [209.85.213.51] (HELO mail-yh0-f51.google.com) (209.85.213.51) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Dec 2013 01:30:51 +0000 Received: by mail-yh0-f51.google.com with SMTP id c41so4492321yho.10 for ; Mon, 16 Dec 2013 17:30:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=9lGZRh+nuORylW9JBUIB7D+MrFahlmENIvG93rhZDm8=; b=WQVpFPiqT9LLhkueOa/pHfSpsXX8SOKoaj43iwURyo+ytCV3ZfGk6DmYCwi5WaFoaT JFFF2EloNRlP+FTfeJ0UpaPFIf3VIUEqPVffyrX4l7BzvFeLvt2cPUrVXt6j/YIpq9XZ wTiaogABfNIxnXauRpRXN/CGEcxm82wjCzgamUQnVDdPFZwQng5+YNwj3qRl7InNqp4F H95COm1J8oxzqD3IABXlW8xtrui/N7tJ2tGOTYm6E3DfmZ8seFKu/LLGC4IUfnnDTF6y sEyV66INYfYDY/R8P2A3HuL7LpCyiNR8IHGGkuRsU6COOXShQFDkl2ukccUCl1G00Wpi mWYA== X-Received: by 10.236.63.5 with SMTP id z5mr15288539yhc.49.1387243830699; Mon, 16 Dec 2013 17:30:30 -0800 (PST) Received: from [127.0.0.1] (h244.136.188.173.dynamic.ip.windstream.net. [173.188.136.244]) by mx.google.com with ESMTPSA id d26sm21980691yhj.25.2013.12.16.17.30.28 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Dec 2013 17:30:29 -0800 (PST) Message-ID: <52AFA92A.1060302@gmail.com> Date: Mon, 16 Dec 2013 20:30:18 -0500 From: "John M. Wargo" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Cordova Dev Subject: Fwd: Camera targetWidth & targetHeight References: <529D4CBA.3040703@gmail.com> In-Reply-To: <529D4CBA.3040703@gmail.com> X-Forwarded-Message-Id: <529D4CBA.3040703@gmail.com> Content-Type: multipart/alternative; boundary="------------070003050601040309050700" X-Virus-Checked: Checked by ClamAV on apache.org --------------070003050601040309050700 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable So, does anyone have an opinion on how this discrepancy should be address= ed? The methods work differently on different platforms and I think they = should work the same. To me Android works as I expect it should - setting the properties along = the right axis. Do I need to file JIRA tickets about bringing iOS into al= ignment? Also, what about when only one parameter is provided? Should we decide ho= w this is supposed to work and implement it across the different platform= s? I'm for supporting only one parameter, allows me to set the one side = and let the camera aspect ratio determine the other. -------- Original Message -------- Subject: Camera targetWidth & targetHeight Date: Mon, 02 Dec 2013 22:15:06 -0500 From: John M. Wargo To: Cordova Dev A while back I posted a question regarding Camera targetWidth & targetHei= ght properties and how they worked. After some discussion, the conclusion= I reached was that the documentation couldn't be correct about how it wo= rked since there was no way to determine the camera's resolution with the= current API but the docs said I had to provide both parameters. I said = I'd do some testing and I have finally gotten around to completing it. He= re's what I discovered: I created an application that allowed me to pass in different values for = targetWidth & targetHeight when taking a picture. I tested at the followi= ng image sizes: 640x480, 800x600, 1024x768 as well as setting only the ta= rgetWidth to 1024 or only the targetHeight to 768. Here's the results: Android Portrait Landscape 480x640 640x480 600x800 800x600 768x1024 1024x768 768x1024 1024x768 768x1024 1024x768 iOS Portrait Landscape 360x480 640x480 450x600 800x600 576x768 1024x768 2448x3264 3264x2448 2448x3264 3264x2448 Windows Phone 8 Portrait Landscape 1836x3264 3264x1836 1836x3264 3264x1836 1836x3264 3264x1836 1836x3264 3264x1836 1836x3264 3264x1836 As you can see, Android properly implements the targetWidth & targetHeigh= t properties. On iOS, it supports setting both properties, but not instan= ces where only one is specified. Windows Phone 8 ignores the parameters c= ompletely. On iOS, when you turn the device on its side, the Camera API = applies the target width or height to the wrong axis (Android does this w= ell however). I'm trying to test this on a BlackBerry device, but my development enviro= nment is giving me fits right now. I'll work on it in the morning and pub= lish my results when I get them. I would suggest that the android implementation is as expected and that t= he other platforms need their implementations of targetWidth & targetHeig= ht adjusted so it works correctly. The documentation should be updated as= well as it's incorrect today specifying that both properties must be pro= vided. If the group doesn't want to support only providing one of the properties= , then I would expect that the onError callback is called when only one i= s provided rather than simply ignoring them as is the case with iOS and W= indows Phone. I posted my sample application and a spreadsheet with my results to https= ://github.com/johnwargo/camera_res_test --=20 John M. Wargo @johnwargo www.johnwargo.com -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= ----------------------------------------- --=20 John M. Wargo @johnwargo www.johnwargo.com -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= -------------------------------------------------------------------------= ----------------------------------------- --------------070003050601040309050700--