Return-Path: Delivered-To: apmail-xmlgraphics-general-archive@www.apache.org Received: (qmail 45949 invoked from network); 27 Jul 2010 12:58:42 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Jul 2010 12:58:42 -0000 Received: (qmail 9359 invoked by uid 500); 27 Jul 2010 12:58:40 -0000 Mailing-List: contact general-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@xmlgraphics.apache.org Delivered-To: mailing list general@xmlgraphics.apache.org Received: (qmail 9346 invoked by uid 99); 27 Jul 2010 12:58:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jul 2010 12:58:39 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [213.239.215.103] (HELO tux17.hoststar.ch) (213.239.215.103) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Jul 2010 12:58:30 +0000 Received: from [192.168.0.33] (194-230-63-144.static.adslpremium.ch [194.230.63.144]) (authenticated bits=0) by tux17.hoststar.ch (8.13.6/8.12.11) with ESMTP id o6RCw9HW006588 for ; Tue, 27 Jul 2010 14:58:12 +0200 Date: Tue, 27 Jul 2010 14:58:12 +0200 From: Jeremias Maerki To: general@xmlgraphics.apache.org Subject: Re: svn commit: r979567 - in /xmlgraphics/commons/trunk: src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java status.xml In-Reply-To: <4C4EBB6A.2090002@gmail.com> References: <20100727075040.F1117238897A@eris.apache.org> <4C4EBB6A.2090002@gmail.com> Message-Id: <20100727144957.C480.60BA733C@jeremias-maerki.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Mailer: Becky! ver. 2.50.02 [en] X-Virus-Checked: Checked by ClamAV on apache.org Hi Vincent On 27.07.2010 12:56:42 Vincent Hennebert wrote: > Hi, > > > Author: jeremias > > Date: Tue Jul 27 07:50:40 2010 > > New Revision: 979567 > > > > URL: http://svn.apache.org/viewvc?rev=979567&view=rev > > Log: > > Fix for TIFFs which report zero as their resolution. This resulted in an exception. > > Modified: > > xmlgraphics/commons/trunk/src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java > > ============================================================================== > > @@ -127,7 +127,10 @@ public class PreloaderTIFF extends Abstr > > xRes = fldx.getAsFloat(0); > > yRes = fldy.getAsFloat(0); > > } > > - if (unit == 2) { > > + if (xRes == 0 || yRes == 0) { > > + //Some TIFFs may report 0 here which would lead to problems > > Isn’t it a degenerate case that the user wants to be made aware of? Not IMO. The users can always size the images to their wishes. > Also, what if xRes == 0 but yRes != 0 or vice versa? That's a very interesting question... Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: general-help@xmlgraphics.apache.org