From sanselan-dev-return-196-apmail-incubator-sanselan-dev-archive=incubator.apache.org@incubator.apache.org Wed Jul 16 08:29:52 2008 Return-Path: Delivered-To: apmail-incubator-sanselan-dev-archive@locus.apache.org Received: (qmail 59507 invoked from network); 16 Jul 2008 08:29:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 16 Jul 2008 08:29:52 -0000 Received: (qmail 54304 invoked by uid 500); 16 Jul 2008 08:29:52 -0000 Delivered-To: apmail-incubator-sanselan-dev-archive@incubator.apache.org Received: (qmail 54285 invoked by uid 500); 16 Jul 2008 08:29:52 -0000 Mailing-List: contact sanselan-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: sanselan-dev@incubator.apache.org Delivered-To: mailing list sanselan-dev@incubator.apache.org Received: (qmail 54274 invoked by uid 99); 16 Jul 2008 08:29:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2008 01:29:52 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Jul 2008 08:29:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id D50B7234C15F for ; Wed, 16 Jul 2008 01:29:31 -0700 (PDT) Message-ID: <683433973.1216196971867.JavaMail.jira@brutus> Date: Wed, 16 Jul 2008 01:29:31 -0700 (PDT) From: "Charles Matthew Chen (JIRA)" To: sanselan-dev@incubator.apache.org Subject: [jira] Resolved: (SANSELAN-5) Can't convert PNG image to GIF image In-Reply-To: <336650352.1216145731806.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/SANSELAN-5?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Charles Matthew Chen resolved SANSELAN-5. ----------------------------------------- Resolution: Fixed Assignee: Charles Matthew Chen (was: Carsten Ziegeler) Fixed two issues in the PNG reader. Wasn't handling the 16-bit mode 4 PNGs properly. Also, wasn't gamma-correcting non-palette values properly in PNGs. > Can't convert PNG image to GIF image > ------------------------------------ > > Key: SANSELAN-5 > URL: https://issues.apache.org/jira/browse/SANSELAN-5 > Project: Sanselan > Issue Type: Bug > Environment: Windows XP SP2, Eclipse IDE, Custom Java database conversion program, JRE 1.5.x > Reporter: Dirk Daems > Assignee: Charles Matthew Chen > Priority: Blocker > Attachments: 12118.png > > > I want to transform a set of PNG images to GIF images. > > The code I tried: > private static void convertImage(String sourceDir, String sourceFile, String targetDir){ > try{ > > BufferedImage source = Sanselan.getBufferedImage(new File(sourceDir + File.separator + sourceFile)); > String targetFile = sourceFile.substring(0, sourceFile.indexOf('.')) + ".gif"; > Hashtable parms = new Hashtable(); > // parms.put(SanselanConstants.PARAM_KEY_VERBOSE, Boolean.TRUE); > Sanselan.writeImage(source, new File(targetDir + File.separator + targetFile), ImageFormat.IMAGE_FORMAT_GIF, parms); > > } > catch(Exception ex){ > ex.printStackTrace(); > } > > } > > I don't get any errors but the image that's generated cannot be displayed and is way too small (2kb). > I attached an example of a PNG file I can't seem to convert. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.