This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi,
The following should have been part of the original java.awt.color drop
from GNU Classpath.
2004-11-07 Sven de Marothy <sven@physto.se>
* gnu/java/awt/color/RgbProfileConverter.java (RgbProfileConverter):
Don't invert matrix when reverse CLUT is available.
* gnu/java/awt/color/LinearRGBConverter.java: Documentation update.
* java/awt/color/ICC_ColorSpace.java: Likewise.
* java/awt/color/ICC_Profile.java: Likewise.
* java/awt/color/ICC_ProfileGray.java: Likewise.
* java/awt/color/ICC_ProfileRGB.java: Likewise.
I am committing this now to the gui branch.
Cheers,
Mark
--- gnu/java/awt/color/LinearRGBConverter.java 2004-11-06 20:06:35.000000000 +0100
+++ /home/mark/src/classpath/gnu/java/awt/color/LinearRGBConverter.java 2004-10-28 15:11:49.000000000 +0200
@@ -47,10 +47,6 @@
*
* @author Sven de Marothy
*/
-/**
- * Linear RGB.
- * TESTED
- */
public class LinearRGBConverter implements ColorSpaceConverter
{
/**
--- gnu/java/awt/color/RgbProfileConverter.java 2004-11-06 20:06:36.000000000 +0100
+++ /home/mark/src/classpath/gnu/java/awt/color/RgbProfileConverter.java 2004-10-28 15:11:49.000000000 +0200
@@ -79,7 +79,6 @@
{
toPCS = fromPCS = null;
matrix = profile.getMatrix();
- inv_matrix = invertMatrix(matrix);
// get TRCs
try
@@ -129,6 +128,16 @@
{
fromPCS = null;
}
+
+ // Calculate the inverse matrix if no reverse CLUT is available
+ if(fromPCS == null)
+ inv_matrix = invertMatrix(matrix);
+ else
+ {
+ // otherwise just set it to an identity matrix
+ inv_matrix = new float[3][3];
+ inv_matrix[0][0] = inv_matrix[1][1] = inv_matrix[2][2] = 1.0f;
+ }
}
public float[] toCIEXYZ(float[] in)
--- java/awt/color/ICC_ColorSpace.java 2004-11-06 23:24:11.000000000 +0100
+++ /home/mark/src/classpath/java/awt/color/ICC_ColorSpace.java 2004-11-06 13:45:59.000000000 +0100
@@ -1,5 +1,5 @@
/* ICC_ColorSpace.java -- the canonical color space implementation
- Copyright (C) 2000, 2002 Free Software Foundation
+ Copyright (C) 2000, 2002, 2004 Free Software Foundation
This file is part of GNU Classpath.
--- java/awt/color/ICC_Profile.java 2004-11-06 23:24:11.000000000 +0100
+++ /home/mark/src/classpath/java/awt/color/ICC_Profile.java 2004-11-06 13:45:59.000000000 +0100
@@ -1,5 +1,5 @@
/* ICC_Profile.java -- color space profiling
- Copyright (C) 2000, 2002 Free Software Foundation
+ Copyright (C) 2000, 2002, 2004 Free Software Foundation
This file is part of GNU Classpath.
@@ -74,7 +74,7 @@
*
* The ICC_Profile class implements the version 2 format specified by
* International Color Consortium Specification ICC.1:1998-09,
- * and it's addendum ICC.1A:1999-04, April 1999
+ * and its addendum ICC.1A:1999-04, April 1999
* (available at www.color.org)
*
* @author Sven de Marothy
@@ -707,7 +707,6 @@
+ i * TagEntry.entrySize + 12),
data);
- // System.out.println("Tag:"+te);
if (tagTable.put(te.hashKey(), te) != null)
throw new IllegalArgumentException("Duplicate tag in profile:" + te);
}
@@ -814,11 +813,11 @@
/**
* Returns curve data for a 'curv'-type tag
- * If it's a gamma curve, a singly entry will be returned with the
+ * If it's a gamma curve, a single entry will be returned with the
* gamma value (including 1.0 for linear response)
* Otherwise the TRC table is returned.
*
- * (Package private - used by ICC_ProfileXYZ and ICC_ProfileGray)
+ * (Package private - used by ICC_ProfileRGB and ICC_ProfileGray)
*/
short[] getCurve(int signature)
{
--- java/awt/color/ICC_ProfileGray.java 2004-11-06 23:24:11.000000000 +0100
+++ /home/mark/src/classpath/java/awt/color/ICC_ProfileGray.java 2004-11-06 13:45:59.000000000 +0100
@@ -1,5 +1,5 @@
/* ICC_ProfileGray.java -- the ICC profile for a Gray colorspace
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -67,7 +67,7 @@
/**
* Package-private constructor used by ICC_ColorSpace for creating an
- * ICC_ProfileRGB from a predefined ColorSpace (CS_GRAY)
+ * ICC_ProfileGray from a predefined ColorSpace (CS_GRAY)
*/
ICC_ProfileGray(int cspace)
{
@@ -100,7 +100,7 @@
/**
* Returns the TRC gamma value.
- * @throws IllegalArgumentException if the TRC is described by a lookup
+ * @throws ProfileDataException if the TRC is described by a lookup
* table and not a gamma value.
*/
public float getGamma()
@@ -118,7 +118,7 @@
/**
* Returns the TRC lookup table.
- * @throws IllegalArgumentException if the TRC is described by a gamma value
+ * @throws ProfileDataException if the TRC is described by a gamma value
* and not a lookup table.
*/
public short[] getTRC()
--- java/awt/color/ICC_ProfileRGB.java 2004-11-06 23:24:11.000000000 +0100
+++ /home/mark/src/classpath/java/awt/color/ICC_ProfileRGB.java 2004-11-06 13:45:59.000000000 +0100
@@ -1,5 +1,5 @@
/* ICC_ProfileRGB.java -- the ICC profile for a RGB colorspace
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -139,7 +139,7 @@
/**
* Returns the gamma value of a component
- * @throws IllegalArgumentException if the TRC is described by a lookup
+ * @throws ProfileDataException if the TRC is described by a lookup
* table and not a gamma value.
*/
public float getGamma(int component)
@@ -174,7 +174,7 @@
/**
* Returns the TRC lookup table for a component
- * @throws IllegalArgumentException if the TRC is described by a gamma
+ * @throws ProfileDataException if the TRC is described by a gamma
* value and not a lookup table.
*/
public short[] getTRC(int component)
Attachment:
signature.asc
Description: This is a digitally signed message part
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |