[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug classpath/22919] java.awt.image.ColorModel bits calculation error
From: |
gcc-bugzilla at gcc dot gnu dot org |
Subject: |
[Bug classpath/22919] java.awt.image.ColorModel bits calculation error |
Date: |
16 Oct 2005 01:27:40 -0000 |
The calculation of the number of bits in the ColorModel(int bits) constructor
is incorrect.
Instead of multiplying by 4, it should divide the bits by 4, in order to be
compatible with sun's implementation.
Here is the REVERSE patch.
--- javaawtimageColorModel.java Sun Mar 06 10:03:13 2005
+++ D:eprcvsworkclasspathjavaawtimageColorModel.java Tue Nov 16 23:10:27
2004
@@ -111,13 +111,12 @@
* Constructs the default color model. The default color model
* can be obtained by calling <code>getRGBdefault</code> of this
* class.
- * @param b the number of bits wide used for bit size of pixel values
+ * @param bits the number of bits wide used for bit size of pixel values
*/
public ColorModel(int bits)
{
- // @classpath-bugfix Fix difference between Sun's class and this class.
- this(bits, // total bits, sRGB, four channels
- nArray(bits / 4, 4), // bits for each channel
+ this(bits * 4, // total bits, sRGB, four channels
+ nArray(bits, 4), // bits for each channel
ColorSpace.getInstance(ColorSpace.CS_sRGB), // sRGB
true, // has alpha
false, // not premultiplied
------- Comment #1 from from-classpath at savannah dot gnu dot org 2005-05-17
00:15 -------
Ok, I'll commit this.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22919
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug classpath/22919] java.awt.image.ColorModel bits calculation error,
gcc-bugzilla at gcc dot gnu dot org <=