You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2004/02/18 06:02:59 UTC

DO NOT REPLY [Bug 27020] New: - [Patch] Grayscale and RGB tinting added to ImageReader

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27020>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27020

[Patch] Grayscale and RGB tinting added to ImageReader

           Summary: [Patch] Grayscale and RGB tinting added to ImageReader
           Product: Cocoon 2
           Version: Current CVS 2.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: sitemap components
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: peter@xml.grumpykitty.biz


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

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.

The patch should be attached shortly.