> > The root of the problem is that readRaster(int,
> > ImageReadParam) ignores the ImageTypeSpecifier's
> > color and/or destination in the ImageReadParam.
> 
> I don't agree with you here.  The javadoc of this
> method
> clearly says that it returns raw pixel data without
> color
> conversion applied, and it ignores image-type
> parameters.
> 
> > If I could specify a ColorSpace or ColorModel in
> the
> > ImageReadParam and that ColorSpace or ColorModel
> was
> > used in the reading, then there would be no
> problem.
> 
> Then you need read(int, ImageReadParam).
> 
> At beginning, you said that you'd like to use
> readRaster(0, null)
> instead of read(0) because the former is 10 to 20%
> faster. 
> I guess it's faster because it skips the step of
> color conversion.
> If you do color conversion with ColorConvertOp after
> readRaster(0, null), the overall performance might
> not be
> better than read(0) .

I know what the docs say.  That's how I know readRaster()  ignores the 
ImageTypeSpecifier.

But if readRaster() did not ignore the ImageTypeSpecifier, then there would be 
no problem.  

You might be right about the performance hit if color conversion takes place -- 
but we will never know for sure.

All we know for sure is that the only way to get the Raster is to make a 
BufferedImage using read(0) which guarantees a performance hit.
[Message sent by forum member 'demonduck' (demonduck)]

http://forums.java.net/jive/thread.jspa?messageID=280879

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to