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 2005/09/01 18:29:26 UTC

DO NOT REPLY [Bug 36466] New: - ImageReader problem with grayScaleFilter

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

http://issues.apache.org/bugzilla/show_bug.cgi?id=36466

           Summary: ImageReader problem with grayScaleFilter
           Product: Cocoon 2
           Version: 2.1.7
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: general components
        AssignedTo: dev@cocoon.apache.org
        ReportedBy: vbilan@tssg.org


SiteMap:
<map:reader logger="sitemap.reader.image" name="jpg-reader"
src="org.apache.cocoon.reading.ImageReader"/>

<map:match pattern="**/*.jpg">
  <map:read type="jpg-reader" mime-type="image/jpg" src="image/{1}/{2}.jpg">
    <map:parameter name="expires" value="-1"/>
  </map:read>
</map:match>

I did not specify pool-max. The default value is set to 1, is it?
Becouse it always refers to the same instance

.../jpeg/image.jpg?widht=100
pipeline works fine until you specify parameter grayscale and set to true
.../jpeg/image.jpg?width=100&grayscale=true - works fine
but after that you can't create not grayscale image
.../jpeg/image.jpg?width=200&grayscale=false you will get grayscale image any
way, Because:
in Setup  method you set this.grayscaleFilter

 if (par.getParameterAsBoolean("grayscale", GRAYSCALE_DEFAULT)) {
  this.grayscaleFilter = new
ColorConvertOp(ColorSpace.getInstance(ColorSpace.CS_GRAY), null);
  }

and never set to null, so when the pool of that ImageReader will be full of
instances with grayscaleFilter set it wont be possible to get original image

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.