[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug awt/28369] New: BufferedImage.getRGB returns bad pixel data
From: |
hendrich at informatik dot uni-hamburg dot de |
Subject: |
[Bug awt/28369] New: BufferedImage.getRGB returns bad pixel data |
Date: |
13 Jul 2006 08:21:32 -0000 |
In some cases, BufferedImage.getRGB() returns pixel data in ABGR order
instead of ARGB order.
Testcase attached; see the log below for some sample output (linux x86)
and the corresponding output from the reference implementation. jamvm
claims DirectColorModel both for the initial and the converted image,
but the pixel data is ABGR.
Note that the two-step approach (first loading via toolkit, then converting
to buffered image) is required because the RI returns a non-buffered image
from Toolkit.createImage(), and I need a BufferedImage to access the raw
pixels.
Using ImageIO.read() might be a better option, but ImageIO tended to be
very slow on classpath and extremely slow for certain images on the RI.
jamvm niffler.GetRGBTest images/screen-araucaria.gif
Image is: address@hidden: type=0
java.awt.image.DirectColorModel[pixel_bits=32,
address@hidden, transferType=3, transparency=3,
hasAlpha=true, isAlphaPremultiplied=false, redMask=ff, greenMask=ff00,
blueMask=ff0000, alphaMask=ff000000] java.awt.image.WritableRaster[(0,0), 829 x
600,java.awt.image.SinglePixelPackedSampleModel[scanlineStride=829,
mask[0]=0xff, mask[1]=0xff00, mask[2]=0xff0000,
mask[3]=0xff000000],address@hidden
BufferedImage is: address@hidden: type=0
java.awt.image.DirectColorModel[pixel_bits=32,
address@hidden, transferType=3, transparency=3,
hasAlpha=true, isAlphaPremultiplied=false, redMask=ff, greenMask=ff00,
blueMask=ff0000, alphaMask=ff000000] java.awt.image.WritableRaster[(0,0), 829 x
600,java.awt.image.SinglePixelPackedSampleModel[scanlineStride=829,
mask[0]=0xff, mask[1]=0xff00, mask[2]=0xff0000,
mask[3]=0xff000000],address@hidden
RGB[0,0] = 255 100 50 180
RGB[27,13] = 255 156 102 52
RGB[599,828] = 255 252 253 251
java niffler.GetRGBTest images/screen-araucaria.gif
Image is: address@hidden
-I- getBufferedImage took 43 msec.
BufferedImage is: address@hidden: type = 1 DirectColorModel: rmask=ff0000
gmask=ff00 bmask=ff amask=0 IntegerInterleavedRaster: width = 829 height = 600
#Bands = 3 xOff = 0 yOff = 0 dataOffset[0] 0
RGB[0,0] = 255 180 50 100
RGB[27,13] = 255 52 102 156
RGB[599,828] = 255 251 253 252
--
Summary: BufferedImage.getRGB returns bad pixel data
Product: classpath
Version: 0.92
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: awt
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hendrich at informatik dot uni-hamburg dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28369
- [Bug awt/28369] New: BufferedImage.getRGB returns bad pixel data,
hendrich at informatik dot uni-hamburg dot de <=
- [Bug awt/28369] BufferedImage.getRGB returns bad pixel data, hendrich at informatik dot uni-hamburg dot de, 2006/07/13
- [Bug awt/28369] BufferedImage.getRGB returns bad pixel data, andreast at gcc dot gnu dot org, 2006/07/13
- [Bug awt/28369] BufferedImage.getRGB returns bad pixel data, andreast at gcc dot gnu dot org, 2006/07/13
- [Bug awt/28369] BufferedImage.getRGB returns bad pixel data, andreast at gcc dot gnu dot org, 2006/07/13
- [Bug awt/28369] BufferedImage.getRGB returns bad pixel data, cvs-commit at developer dot classpath dot org, 2006/07/13
- [Bug awt/28369] BufferedImage.getRGB returns bad pixel data, sven at physto dot se, 2006/07/13
- [Bug awt/28369] BufferedImage.getRGB returns bad pixel data, hendrich at informatik dot uni-hamburg dot de, 2006/07/14