cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.2/src/java/org/apache/cocoon/reading ResourceReader.java ImageReader.java
Date Thu, 11 Mar 2004 14:52:04 GMT
cziegeler    2004/03/11 06:52:04

  Modified:    src/java/org/apache/cocoon/reading ResourceReader.java
                        ImageReader.java
  Log:
  Changing internal redirect to a forward
  Add new sitemap parameter handling
  
  Revision  Changes    Path
  1.8       +3 -3      cocoon-2.2/src/java/org/apache/cocoon/reading/ResourceReader.java
  
  Index: ResourceReader.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/reading/ResourceReader.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ResourceReader.java	8 Mar 2004 14:03:32 -0000	1.7
  +++ ResourceReader.java	11 Mar 2004 14:52:04 -0000	1.8
  @@ -266,12 +266,12 @@
               else {
                   response.addHeader("Vary", "Host");
               }
  -
  +            
               long lastModified = getLastModified();
               if (lastModified > 0) {
                   response.setDateHeader("Last-Modified", lastModified);
               }
  -
  +            
               try {
                   inputStream = inputSource.getInputStream();
               }
  
  
  
  1.7       +25 -25    cocoon-2.2/src/java/org/apache/cocoon/reading/ImageReader.java
  
  Index: ImageReader.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/reading/ImageReader.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ImageReader.java	8 Mar 2004 23:34:12 -0000	1.6
  +++ ImageReader.java	11 Mar 2004 14:52:04 -0000	1.7
  @@ -56,17 +56,17 @@
    *     </dd>
    *     <dt>&lt;scale(Red|Green|Blue)&gt;</dt>
    *     <dd>This parameter is optional. When specified it will cause the 
  - *  specified color component in the image to be multiplied by the 
  - *  specified floating point value.
  + *	specified color component in the image to be multiplied by the 
  + *	specified floating point value.
    *     </dd>
    *     <dt>&lt;offset(Red|Green|Blue)&gt;</dt>
    *     <dd>This parameter is optional. When specified it will cause the 
  - *  specified color component in the image to be incremented by the 
  - *  specified floating point value.
  + *	specified color component in the image to be incremented by the 
  + *	specified floating point value.
    *     </dd>
    *     <dt>&lt;grayscale&gt;</dt>
    *     <dd>This parameter is optional. When specified and set to true it
  - *  will cause each image pixel to be normalized. 
  + *	will cause each image pixel to be normalized. 
    *     </dd>
    *   </dl>
    *
  @@ -105,7 +105,7 @@
           scaleColor[2] = par.getParameterAsFloat("scaleBlue", -1.0f);
           offsetColor[0] = par.getParameterAsFloat("offsetRed", 0.0f);
           offsetColor[1] = par.getParameterAsFloat("offsetGreen", 0.0f);
  -        offsetColor[2] = par.getParameterAsFloat("offsetBlue", 0.0f);   
  +        offsetColor[2] = par.getParameterAsFloat("offsetBlue", 0.0f);	
   
           boolean filterColor = false;
   
  @@ -131,8 +131,8 @@
               grayscaleFilter = new ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_GRAY),
null);
           } else {
               grayscaleFilter = null;
  -        }   
  -    
  +        }	
  +	
           String enlargePar = par.getParameter("allow-enlarging", ENLARGE_DEFAULT);
           if ("true".equalsIgnoreCase(enlargePar) || "yes".equalsIgnoreCase(enlargePar)){
               enlarge = true;
  @@ -219,28 +219,28 @@
               try {
                   JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(inputStream);
                   BufferedImage original = decoder.decodeAsBufferedImage();
  -                BufferedImage currentImage = original;
  +            	BufferedImage currentImage = original;
   
  -                if (width > 0 || height > 0) {
  -                    JPEGDecodeParam decodeParam = decoder.getJPEGDecodeParam();
  -                    double ow = decodeParam.getWidth();
  -                    double oh = decodeParam.getHeight();
  +            	if (width > 0 || height > 0) {
  +	                JPEGDecodeParam decodeParam = decoder.getJPEGDecodeParam();
  +        	        double ow = decodeParam.getWidth();
  +	                double oh = decodeParam.getHeight();
   
  -                    AffineTransformOp filter = new AffineTransformOp(getTransform(ow, oh,
width, height), AffineTransformOp.TYPE_BILINEAR);
  -                    WritableRaster scaledRaster = filter.createCompatibleDestRaster(currentImage.getRaster());
  +	                AffineTransformOp filter = new AffineTransformOp(getTransform(ow, oh,
width, height), AffineTransformOp.TYPE_BILINEAR);
  +        	        WritableRaster scaledRaster = filter.createCompatibleDestRaster(currentImage.getRaster());
   
  -                    filter.filter(currentImage.getRaster(), scaledRaster);
  +	                filter.filter(currentImage.getRaster(), scaledRaster);
   
  -                    currentImage = new BufferedImage(original.getColorModel(), scaledRaster,
true, null);
  -                }
  +	                currentImage = new BufferedImage(original.getColorModel(), scaledRaster,
true, null);
  +            	}
   
  -                if (null != grayscaleFilter) {
  -                    grayscaleFilter.filter(currentImage, currentImage);
  -                }
  +            	if (null != grayscaleFilter) {
  +            	    grayscaleFilter.filter(currentImage, currentImage);
  +            	}
   
  -                if (null != colorFilter) {
  -                    colorFilter.filter(currentImage, currentImage);
  -                }
  +            	if (null != colorFilter) {
  +            	    colorFilter.filter(currentImage, currentImage);
  +            	}
   
                   if (!handleJVMBug()) {
                       if (getLogger().isDebugEnabled()) {
  
  
  

Mime
View raw message