Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6585922
Votes 0
Synopsis ImagingOpException from ConvolveOp when input BufferedImage is TYPE_3BYTE_BGR
Category java:classes_2d
Reported Against
Release Fixed 7(b20)
State 10-Fix Delivered, bug
Priority: 4-Low
Related Bugs 6671593 , 4886732
Submit Date 26-JUL-2007
Description
The attached test case calls ConvolveOp.filter() on a BufferedImage which
is returned from ImageIO as TYPE_3BYTE_BGR. The test throws an exception as follows :

java ConvolveOpTest
Exception in thread "main" java.awt.image.ImagingOpException: Unable to convolve src image
        at java.awt.image.ConvolveOp.filter(ConvolveOp.java:180)
        at ConvolveOpTest.testConvolveIdentitySample(ConvolveOpTest.java:25)
        at ConvolveOpTest.main(ConvolveOpTest.java:9)
Posted Date : 2007-07-26 19:16:00.0
Work Around
N/A
Evaluation
The root of the problem is that createCompatibleDestImage() of
ConvolveOp class creates buffered image of custom type (in fact
it could be named as TYPE_3BYTE_RGB) as compatible destination
for  TYPE_3BYTE_BGR image.

It happens because images of these types has exactly same color
models and only difference is in raster structure. So, approach
based on utilization of ColorModel.createComaptibleWritableRaster()
can not work here.

We may workaround this problem using createCompatibleWritableRaster()
of source image raster. It allows us to inherit correct raster organization
and produce destination image with exactly same structure.

Problem with using custom destination image is covered by CR 4886732.
Suggested fix for 4886732 solves problem with 3BYTE_BGR
source and 3BYTE_RGB destination as with many other cases.
Posted Date : 2007-08-08 12:44:53.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang