can you get the RenderedImage first using
readAsRenderedImage(), get the
ColorModel/ColorSpace from there just 1 time, then do
the rest of your
tiling from that point?
ummm yes, could do that... That would work ok.
But it would be a good thing to know how to find out what the color
-
From: Discussion list for Java 2D API
[mailto:[EMAIL PROTECTED] On Behalf Of
[EMAIL PROTECTED]
Sent: Tuesday, June 17, 2008 4:07 PM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA2D]
javax.imageio.ImageReader.readRaster(..) returns raster wi
can you get the RenderedImage first using
The Raster has bytes that represent the colors of the pixels. But the bytes
are not in the RGB or sRGB space. They have to be converted from whatever they
are to the RGB space.
So how do you do that if you don't know what colorspace the Raster bytes are in?
Do you shift left; right; up;
It seems to me that getRawImageType was supposed to give the raw colorspace
(say YCbCr) for the src but for some reason it couldn't so it gave an RGB
colorspace,
which makes it unreliable.
The following javadoc seems to be somewhat confusing:
It seems to me that getRawImageType was supposed to
give the raw colorspace
(say YCbCr) for the src but for some reason it
couldn't so it gave an RGB colorspace,
which makes it unreliable.
The following javadoc seems to be somewhat
confusing:
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
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
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.
I am not that sure. You seem to be asking for something
more than the Raster. :-) As Robert suggested at
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.
I am not that sure. You seem to be asking for
something
more than the Raster. :-) As Robert suggested at
I don't have a simple example, but the following pages might be helpful:
http://java.sun.com/javase/6/docs/technotes/guides/imageio/spec/apps.fm5.html
http://java.sun.com/javase/6/docs/api/javax/imageio/metadata/doc-files/jpeg_metadata.html
[Message sent by forum member 'jxc' (jxc)]
10 matches
Mail list logo