cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pete <pe...@xml.grumpykitty.biz>
Subject Re: [Patch Submission] Color transform feature added to ImageReader.java
Date Tue, 17 Feb 2004 04:43:16 GMT
Sorry, please disregard the patch attached to the previous message. This
patch is updated to resolve:

    * Documentation was misleading - you can use grayscale alongside 
tinting.
    * Cache key was misleading - grayscale and color tags were inverted.

Apologies,

Peter

Pete wrote:

> 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