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 97BCC9112 for ; Wed, 20 Jun 2012 18:44:46 +0000 (UTC) Received: (qmail 93506 invoked by uid 500); 20 Jun 2012 18:44:43 -0000 Delivered-To: apmail-incubator-callback-dev-archive@incubator.apache.org Received: (qmail 93446 invoked by uid 500); 20 Jun 2012 18:44:43 -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 93246 invoked by uid 99); 20 Jun 2012 18:44:43 -0000 Received: from issues-vm.apache.org (HELO issues-vm) (140.211.11.160) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2012 18:44:43 +0000 Received: from isssues-vm.apache.org (localhost [127.0.0.1]) by issues-vm (Postfix) with ESMTP id 233E2141F4C for ; Wed, 20 Jun 2012 18:44:43 +0000 (UTC) Date: Wed, 20 Jun 2012 18:44:43 +0000 (UTC) From: "Simon MacDonald (JIRA)" To: callback-dev@incubator.apache.org Message-ID: <645179189.35318.1340217883148.JavaMail.jiratomcat@issues-vm> In-Reply-To: <1555952610.34265.1340205102779.JavaMail.jiratomcat@issues-vm> Subject: [jira] [Commented] (CB-940) Android image compression algorithm uses too much memory. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CB-940?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13397755#comment-13397755 ] Simon MacDonald commented on CB-940: ------------------------------------ @Joe, obviously I did not mean we should invent the algorithm from scratch. Rather it looks like we will need to implement an existing algorithm in Java. For more background on this problem I've already looked into the source of Bitmap.compress() and it makes a JNI call so we can't modify that algorithm. Most third party JPEG manipulation libraries written in Java run into one of the following three problems: 1) Their license is not good for us, LGPL or GPL. 2) They make use of java.awt which is not available on Android. 3) They make use of javax.imageIO which is not available on Android. So that is what led me to write we'll need to implement our own version of the algorithm. @Jukka, those are good resources, I will look into them in more detail. @Shaz, mem-mapped files may come into play but it is too early to say right now. > Android image compression algorithm uses too much memory. > --------------------------------------------------------- > > Key: CB-940 > URL: https://issues.apache.org/jira/browse/CB-940 > Project: Apache Cordova > Issue Type: Bug > Components: Android > Affects Versions: 0.9.5, 0.9.6, 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 1.6.0, 1.6.1, 1.7.0, 1.8.0, 1.8.1 > Reporter: Simon MacDonald > Assignee: Simon MacDonald > > We need to write our own version of jpg compression algorithm as the one that Android has implemented in Bitmap.compress requires the entire image to be loaded in memory which can cause out of memory errors. -- 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