cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anathan...@apache.org
Subject svn commit: r674122 - in /cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src: changes/changes.xml main/java/org/apache/cocoon/reading/imageop/ResizeOperation.java
Date Fri, 04 Jul 2008 20:55:11 GMT
Author: anathaniel
Date: Fri Jul  4 13:55:11 2008
New Revision: 674122

URL: http://svn.apache.org/viewvc?rev=674122&view=rev
Log:
<action dev="AN" type="fix" fixes-bug="COCOON-2177" due-to="Mark Lundquist" due-to-email="lundquist.mark@gmail.com">
  ImageOp block: Make resize a no-op if width and height are zero.
</action>

Modified:
    cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/changes/changes.xml
    cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/main/java/org/apache/cocoon/reading/imageop/ResizeOperation.java

Modified: cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/changes/changes.xml?rev=674122&r1=674121&r2=674122&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/changes/changes.xml (original)
+++ cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/changes/changes.xml Fri Jul
 4 13:55:11 2008
@@ -25,6 +25,9 @@
     <document>
       <body>
         <release version="1.0.0-M1" date="2007-??-??" description="unreleased">   

+          <action dev="anathaniel" type="fix" issue="COCOON-2177" due-to="Mark Lundquist"
due-to-email="lundquist.mark@gmail.com">
+            Make resize a no-op if width and height are zero.
+          </action>
           <action dev="gkossakowski" type="add" issue="COCOON-2133" due-to="Robin Wyles"
due-to-email="reb@robinwyles.com">
             Add "allow-enlarge" parameter to ImageOp resize operation.
           </action>

Modified: cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/main/java/org/apache/cocoon/reading/imageop/ResizeOperation.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/main/java/org/apache/cocoon/reading/imageop/ResizeOperation.java?rev=674122&r1=674121&r2=674122&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/main/java/org/apache/cocoon/reading/imageop/ResizeOperation.java
(original)
+++ cocoon/trunk/blocks/cocoon-imageop/cocoon-imageop-impl/src/main/java/org/apache/cocoon/reading/imageop/ResizeOperation.java
Fri Jul  4 13:55:11 2008
@@ -57,6 +57,9 @@
         if( ! enabled ) {
             return image;
         }
+        if ( this.width == 0 && this.height == 0 ) {
+            return image;
+        }
         double height = image.getHeight();
         double width = image.getWidth();
         double xScale = this.width / width;



Mime
View raw message