Return-Path: X-Original-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 184DB731E for ; Tue, 6 Dec 2011 02:16:03 +0000 (UTC) Received: (qmail 9926 invoked by uid 500); 6 Dec 2011 02:16:03 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 9902 invoked by uid 500); 6 Dec 2011 02:16:03 -0000 Mailing-List: contact callback-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-dev@incubator.apache.org Received: (qmail 9893 invoked by uid 99); 6 Dec 2011 02:16:03 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2011 02:16:02 +0000 X-ASF-Spam-Status: No, hits=-2001.2 required=5.0 tests=ALL_TRUSTED,RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Dec 2011 02:16:00 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id D6736CA034 for ; Tue, 6 Dec 2011 02:15:39 +0000 (UTC) Date: Tue, 6 Dec 2011 02:15:39 +0000 (UTC) From: "Simon MacDonald (Commented) (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <1538045679.43818.1323137739879.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <1087117648.40135.1321563950961.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (CB-17) WebView caching resized pictures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CB-17?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13163275#comment-13163275 ] Simon MacDonald commented on CB-17: ----------------------------------- My fix resolves the problem where the webview is caching the resize.jpg image. If you want to get the original file do a getPicture but don't specify a new targetWidth or targetHeight. > WebView caching resized pictures > -------------------------------- > > Key: CB-17 > URL: https://issues.apache.org/jira/browse/CB-17 > Project: Apache Callback > Issue Type: Bug > Components: Android > Affects Versions: 1.1.0 > Reporter: Simon MacDonald > Assignee: Simon MacDonald > Fix For: 1.3.0 > > > If you request a picture from the photo library and you provide a targetHeight/targetWidth we create a temp file in the application cache directory called resize.jpg. If you then show this file in your PG application it works fine. Any subsequent calls to getPhoto using targetHeight/targetWidth will create a new resize.jpg but when you go to display it in your app it shows the first one as it is cached. > Workaround: If your picture is small enough use DATA_URL > Here is some code to reproduce: > function getPhoto(source) { > sourceType=source; > window.resolveLocalFileSystemURI("file:///mnt/sdcard/Android/data/ > com.phonegap.helloworld/cache/resize.jpg", fileExist, onFail); > } > //,allowEdit: true,targetWidth:390,targetHeight:390 > function fileExist(fileEntry) { > alert(fileEntry.fullPath); > fileEntry.remove(removeSuccess,removeFail); > } > function onFail(error) { > navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: > 75, > destinationType: destinationType.FILE_URI, > sourceType: sourceType,targetWidth:390,targetHeight:390}); > } > function removeSuccess() { > alert("file Success Removed"); > navigator.camera.getPicture(onPhotoURISuccess, onFail, { quality: > 75, > destinationType: destinationType.FILE_URI, > sourceType: sourceType,targetWidth:390,targetHeight:390}); > } > function removeFail(error) { > status("Image file delete failed (error " + error.code + ")"); > } -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira