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 A561FF126 for ; Fri, 5 Apr 2013 15:19:02 +0000 (UTC) Received: (qmail 6374 invoked by uid 500); 5 Apr 2013 15:19:02 -0000 Delivered-To: apmail-cordova-dev-archive@cordova.apache.org Received: (qmail 6338 invoked by uid 500); 5 Apr 2013 15:19:02 -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 6329 invoked by uid 99); 5 Apr 2013 15:19:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 15:19:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lorin.beer.dev@gmail.com designates 209.85.223.171 as permitted sender) Received: from [209.85.223.171] (HELO mail-ie0-f171.google.com) (209.85.223.171) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Apr 2013 15:18:58 +0000 Received: by mail-ie0-f171.google.com with SMTP id e14so4465671iej.30 for ; Fri, 05 Apr 2013 08:18:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=f5Sn/0ca3FXw6aqK41oGCH0GIHBeAaqoAmmzYV1UPL8=; b=bE+HIuhThx7thv+42U3uLYLEbNg92OGVdB8YryKul79nBarc1RPuMHVejc+mML1Y8U qdVyCvpcELTc1zo8aLQsyeGCTYWTLszAo2nGGfvJqW0S1/upn6lDqo7B1U7JrDVfMpOG pqdHVuyL2WKf0B8JJkzr0bKwlL76WziiMxjaoqoMUWhjoX66+0S/O67KbSV7aZScmUPA HjCy4XOdu4ouoXQU1tbhr4PK3GFDXGjDs1pov67qxK4FEGF9E49FuHUYdRjJS+EsOvDT gY0434aQwGQZIXDudjXtx592/OVSs+ZnK+Qh+f8GVRw/zldeZt+iQiZ1Cgld+YYpC3B0 6xuQ== MIME-Version: 1.0 X-Received: by 10.42.203.68 with SMTP id fh4mr1647745icb.36.1365175117776; Fri, 05 Apr 2013 08:18:37 -0700 (PDT) Received: by 10.64.8.167 with HTTP; Fri, 5 Apr 2013 08:18:37 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Apr 2013 08:18:37 -0700 Message-ID: Subject: Re: camera saveToPhotoAlbum intent From: Lorin Beer To: dev Content-Type: multipart/alternative; boundary=20cf303f6e2cf390e504d99e9979 X-Virus-Checked: Checked by ClamAV on apache.org --20cf303f6e2cf390e504d99e9979 Content-Type: text/plain; charset=ISO-8859-1 My 2 cents is that defaulting to two file writes for a single image is not desirable behaviour, a big reason why the Exif Writer exists is that it avoids multiple file writes, which the iOS native libraries would otherwise require. Behaviour should be: write to a single specified location. To clarify what is occuring: Here is where the image is written to camera roll: https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVCamera.m#L275 Here is where Exif data is spliced in, while the image is still in memory: https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVCamera.m#L301 Here is where the image with the exif splice is written to a custom file URI: https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVCamera.m#L321 All three of these occur with a single image taken through the image picker controller. Thanks for your work on this James! - Lorin On Fri, Apr 5, 2013 at 7:55 AM, James Jong wrote: > I have been looking at Lorin's iOS image metadata writer that was recently > merged in 2.6.x and noticed that the exif metadata was missing from the > saved photos. After troubleshooting some w Lorin, I discovered that the > image saved to the photo album is the image before scaling and writing of > the exif metadata. This results in 2 different images which was confusing > to me. Is this correct intent? This refers to iOS code but my question is > intended for the Camera API. Do other platforms that support this follow > the same behavior? > > ref code in camera > > https://github.com/apache/cordova-ios/blob/master/CordovaLib/Classes/CDVCamera.m#L275 > > -James Jong > > --20cf303f6e2cf390e504d99e9979--