See attached testcase for a class that tries to use BufferedImage with
TYPE_INT_BGR, because this way it was easier to convert the original C-style
data to actual image data for Java painting.
Exception during event dispatch:
java.lang.UnsupportedOperationException: FIXME: Programmer is confused. Why (and how) does a TYPE_INT_BGR image use ComponentColorModel to store 8-bit values? Is data type TYPE_INT or TYPE_BYTE. What is the difference between TYPE_INT_BGR and TYPE_3BYTE_BGR?
I looked at the source for BufferedImage.java, and I guess it is sufficient
to just remove the FIXME and fall through to the case for TYPE_3BYTE_BGR,
and add another case to set the bits3 mask.
I tried that, but the application then segfaults under jamvm trying to
dereference a null array. However, the same segfault occurs when I change
my testcase to use TYPE_3BYTE_BGR or TYPE_4BYTE_BGR - see next bug report.
Created attachment 11552 [details]
testcase using BufferedImage.TYPE_INT_BGR
After actually reading my ancient code, it seems that I don't really need to
use TYPE_BGR at all... Still, it would be nice if *BGR ordering would work in
Sven did this a few months ago