cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete <pe...@xml.grumpykitty.biz>
Subject [Patch Submission] Color transform feature added to ImageReader.java
Date Tue, 17 Feb 2004 04:16:41 GMT
Hello everyone, as I was building an image gallery app I was requested 
to add
the ability to tint an image to coordinate color schemes with the 
website in
general. To do this I patched the ImageReader to perform a transform on the
RGB color channels. This is configured in exactly the same manner as 
scaling is
now done.

See http://www.grumpykitty.biz/index.html for the results.

This required modification of the

    org.apache.cocoon.reading.ImageReader

class only.

The changes include

       *   Support for creating a grayscale jpeg
       *   Support for tinting ( scale red, green or blue color channel )

       *   Cache key now *always* contains scaling and color coefficients

This does mean that instead of scaling a decoded Raster, a decoded
BufferedImage is used. A BufferedImage consists of a Raster + color
information and is required for the color transform. I consider this the
most pivotal change.

The actual color transform is not applied unless specifically requested
in the sitemap, so I believe the change is benign.

A cvs diff -u style patch to

    /src/java/org/apache/cocoon/reading/ImageReader.java

is attached. Please review and consider it for inclusion in Cocoon.



All the best, and thank you

Peter





Mime
View raw message