cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject cvs commit: xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/acting OraAddAction.java
Date Thu, 02 Jan 2003 20:57:02 GMT
tcurdt      2003/01/02 12:57:02

  Modified:    src/blocks/databases/java/org/apache/cocoon/acting
                        OraAddAction.java
  Log:
  factored out the image stuff
  
  Revision  Changes    Path
  1.2       +6 -6      xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/acting/OraAddAction.java
  
  Index: OraAddAction.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/blocks/databases/java/org/apache/cocoon/acting/OraAddAction.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- OraAddAction.java	18 Oct 2002 14:04:27 -0000	1.1
  +++ OraAddAction.java	2 Jan 2003 20:57:02 -0000	1.2
  @@ -57,13 +57,13 @@
   import org.apache.avalon.framework.configuration.Configuration;
   import org.apache.avalon.framework.configuration.ConfigurationException;
   import org.apache.avalon.framework.parameters.Parameters;
  -import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
  +import org.apache.cocoon.util.ImageProperties;
  +import org.apache.cocoon.util.ImageUtils;
   import org.apache.cocoon.environment.ObjectModelHelper;
   import org.apache.cocoon.environment.Redirector;
   import org.apache.cocoon.environment.Request;
   import org.apache.cocoon.environment.SourceResolver;
  -import org.apache.cocoon.generation.ImageDirectoryGenerator;
   
   import java.io.*;
   import java.sql.Connection;
  @@ -150,9 +150,9 @@
   
                       iparam.setParameter("image-size", String.valueOf(binaryFile.length()));
   
  -                    int [] dimensions = ImageDirectoryGenerator.getSize(binaryFile);
  -                    iparam.setParameter("image-width", String.valueOf(dimensions[0]));
  -                    iparam.setParameter("image-height", String.valueOf(dimensions[1]));
  +                    ImageProperties prop = ImageUtils.getImageProperties(binaryFile);
  +                    iparam.setParameter("image-width", Integer.toString(prop.width));
  +                    iparam.setParameter("image-height", Integer.toString(prop.height));
   
                       synchronized (this.files) {
                           this.files.put(binaryFile, param);
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message