The fix looks good to me.
The spec says "Returns an |ImageTypeSpecifier| indicating the |SampleModel| and |ColorModel| which most closely represents the "raw" internal format of the image. For example, for a JPEG image the raw type might have a YCbCr color space even though the image would conventionally be transformed into an RGB color space prior to display."
Also,

private Iterator<ImageTypeSpecifier> getImageTypesOnThread(int imageIndex)adds 
RGB for YcbCr raw type

case JPEG.JCS_YCbCr:
 832             // As there is no YCbCr ColorSpace, we can't support
 833             // the raw type.
 834
 835             // due to 4705399, use RGB as default in order to avoid
 836             // slowing down of drawing operations with result image.
 837             list.add(getImageType(JPEG.JCS_RGB));



Regards
Prasanta
On 12/1/2015 3:42 PM, Jayathirth D V wrote:

Hi,

_Please review following fix in JDK9:_

Bug : https://bugs.openjdk.java.net/browse/JDK-8143562

Webrev : http://cr.openjdk.java.net/~jdv/8143562/webrev.00/ <http://cr.openjdk.java.net/%7Ejdv/8143562/webrev.00/>

Issue : We are getting null for ImageTypeSpecifier when we use getRawImageType() API for YCbCr Image.

Root cause : When colorspace is YCbCr, there is no condition to create ImageTypeSpecifier in produce() function

Solution : Since we add RGB as default ImageType for YCbCr colorspace in getImageTypes() API. Followed same approach

                    and considering it as RGB in getRawImageType().

Thanks,

Jay


Reply via email to