xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vincent Hennebert <vhenneb...@gmail.com>
Subject Re: svn commit: r979567 - in /xmlgraphics/commons/trunk: src/java/org/apache/xmlgraphics/image/loader/impl/PreloaderTIFF.java status.xml
Date Tue, 27 Jul 2010 10:56:42 GMT
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?
Also, what if xRes == 0 but yRes != 0 or vice versa?


Thanks,
Vincent

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org


Mime
View raw message