OSDN Git Service

* Makefile.in: Rebuilt.
[pf3gnuchains/gcc-fork.git] / libjava / java / awt / color / ICC_Profile.java
1 /* ICC_Profile.java -- color space profiling
2    Copyright (C) 2000, 2002 Free Software Foundation
3
4 This file is part of GNU Classpath.
5
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
9 any later version.
10
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 General Public License for more details.
15
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING.  If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
19 02111-1307 USA.
20
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library.  Thus, the terms and
23 conditions of the GNU General Public License cover the whole
24 combination.
25
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module.  An independent module is a module which is not derived from
33 or based on this library.  If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so.  If you do not wish to do so, delete this
36 exception statement from your version. */
37
38
39 package java.awt.color;
40
41 import java.io.FileInputStream;
42 import java.io.FileOutputStream;
43 import java.io.InputStream;
44 import java.io.IOException;
45 import java.io.ObjectInputStream;
46 import java.io.ObjectOutputStream;
47 import java.io.ObjectStreamException;
48 import java.io.OutputStream;
49 import java.io.Serializable;
50
51 /**
52  * STUBBED
53  * @author Rolf W. Rasmussen <rolfwr@ii.uib.no>
54  * @since 1.2
55  */
56 public class ICC_Profile implements Serializable
57 {
58   /**
59    * Compatible with JDK 1.2+.
60    */
61   private static final long serialVersionUID = -3938515861990936766L;
62
63   public static final int CLASS_INPUT = 0;
64   public static final int CLASS_DISPLAY = 1;
65   public static final int CLASS_OUTPUT = 2;
66   public static final int CLASS_DEVICELINK = 3;
67   public static final int CLASS_COLORSPACECONVERSION = 4;
68   public static final int CLASS_ABSTRACT = 5;
69   public static final int CLASS_NAMEDCOLOR = 6;
70
71   public static final int icSigXYZData = 1482250784;
72   public static final int icSigLabData = 1281450528;
73   public static final int icSigLuvData = 1282766368;
74   public static final int icSigYCbCrData = 1497588338;
75   public static final int icSigYxyData = 1501067552;
76   public static final int icSigRgbData = 1380401696;
77   public static final int icSigGrayData = 1196573017;
78   public static final int icSigHsvData = 1213421088;
79   public static final int icSigHlsData = 1212961568;
80   public static final int icSigCmykData = 1129142603;
81   public static final int icSigCmyData = 1129142560;
82   public static final int icSigSpace2CLR = 843271250;
83   public static final int icSigSpace3CLR = 860048466;
84   public static final int icSigSpace4CLR = 876825682;
85   public static final int icSigSpace5CLR = 893602898;
86   public static final int icSigSpace6CLR = 910380114;
87   public static final int icSigSpace7CLR = 927157330;
88   public static final int icSigSpace8CLR = 943934546;
89   public static final int icSigSpace9CLR = 960711762;
90   public static final int icSigSpaceACLR = 1094929490;
91   public static final int icSigSpaceBCLR = 1111706706;
92   public static final int icSigSpaceCCLR = 1128483922;
93   public static final int icSigSpaceDCLR = 1145261138;
94   public static final int icSigSpaceECLR = 1162038354;
95   public static final int icSigSpaceFCLR = 1178815570;
96
97   public static final int icSigInputClass = 1935896178;
98   public static final int icSigDisplayClass = 1835955314;
99   public static final int icSigOutputClass = 1886549106;
100   public static final int icSigLinkClass = 1818848875;
101   public static final int icSigAbstractClass = 1633842036;
102   public static final int icSigColorSpaceClass = 1936744803;
103   public static final int icSigNamedColorClass = 1852662636;
104
105   public static final int icPerceptual = 0;
106   public static final int icRelativeColorimetric = 1;
107   public static final int icSaturation = 2;
108   public static final int icAbsoluteColorimetric = 3;
109
110   public static final int icSigHead = 1751474532;
111   public static final int icSigAToB0Tag = 1093812784;
112   public static final int icSigAToB1Tag = 1093812785;
113   public static final int icSigAToB2Tag = 1093812786;
114   public static final int icSigBlueColorantTag = 1649957210;
115   public static final int icSigBlueTRCTag = 1649693251;
116   public static final int icSigBToA0Tag = 1110589744;
117   public static final int icSigBToA1Tag = 1110589745;
118   public static final int icSigBToA2Tag = 1110589746;
119   public static final int icSigCalibrationDateTimeTag = 1667329140;
120   public static final int icSigCharTargetTag = 1952543335;
121   public static final int icSigCopyrightTag = 1668313716;
122   public static final int icSigCrdInfoTag = 1668441193;
123   public static final int icSigDeviceMfgDescTag = 1684893284;
124   public static final int icSigDeviceModelDescTag = 1684890724;
125   public static final int icSigDeviceSettingsTag = 1684371059;
126   public static final int icSigGamutTag = 1734438260;
127   public static final int icSigGrayTRCTag = 1800688195;
128   public static final int icSigGreenColorantTag = 1733843290;
129   public static final int icSigGreenTRCTag = 1733579331;
130   public static final int icSigLuminanceTag = 1819635049;
131   public static final int icSigMeasurementTag = 1835360627;
132   public static final int icSigMediaBlackPointTag = 1651208308;
133   public static final int icSigMediaWhitePointTag = 2004119668;
134   public static final int icSigNamedColor2Tag = 1852009522;
135   public static final int icSigOutputResponseTag = 1919251312;
136   public static final int icSigPreview0Tag = 1886545200;
137   public static final int icSigPreview1Tag = 1886545201;
138   public static final int icSigPreview2Tag = 1886545202;
139   public static final int icSigProfileDescriptionTag = 1684370275;
140   public static final int icSigProfileSequenceDescTag = 1886610801;
141   public static final int icSigPs2CRD0Tag = 1886610480;
142   public static final int icSigPs2CRD1Tag = 1886610481;
143   public static final int icSigPs2CRD2Tag = 1886610482;
144   public static final int icSigPs2CRD3Tag = 1886610483;
145   public static final int icSigPs2CSATag = 1886597747;
146   public static final int icSigPs2RenderingIntentTag = 1886597737;
147   public static final int icSigRedColorantTag = 1918392666;
148   public static final int icSigRedTRCTag = 1918128707;
149   public static final int icSigScreeningDescTag = 1935897188;
150   public static final int icSigScreeningTag = 1935897198;
151   public static final int icSigTechnologyTag = 1952801640;
152   public static final int icSigUcrBgTag = 1650877472;
153   public static final int icSigViewingCondDescTag = 1987405156;
154   public static final int icSigViewingConditionsTag = 1986618743;
155   public static final int icSigChromaticityTag = 1667789421;
156
157   public static final int icHdrSize = 0;
158   public static final int icHdrCmmId = 4;
159   public static final int icHdrVersion = 8;
160   public static final int icHdrDeviceClass = 12;
161   public static final int icHdrColorSpace = 16;
162   public static final int icHdrPcs = 20;
163   public static final int icHdrDate = 24;
164   public static final int icHdrMagic = 36;
165   public static final int icHdrPlatform = 40;
166   public static final int icHdrFlags = 44;
167   public static final int icHdrManufacturer = 48;
168   public static final int icHdrModel = 52;
169   public static final int icHdrAttributes = 56;
170   public static final int icHdrRenderingIntent = 64;
171   public static final int icHdrIlluminant = 68;
172   public static final int icHdrCreator = 80;
173
174   public static final int icTagType = 0;
175   public static final int icTagReserved = 4;
176   public static final int icCurveCount = 8;
177   public static final int icCurveData = 12;
178
179   public static final int icXYZNumberX = 8;
180
181   /**
182    * @serial
183    */
184   final int iccProfileSerializedDataVersion = 1;
185
186   transient int profileID;
187
188   ICC_Profile(int profileID)
189   {
190     this.profileID = profileID;
191   }
192
193   protected void finalize()
194   {
195     // XXX What resources should we free?
196   }
197
198   public static ICC_Profile getInstance(byte[] data)
199   {
200     throw new Error("not implemented");
201   }
202
203   public static ICC_Profile getInstance(int cspace)
204   {
205     return new ICC_Profile(cspace);
206   }
207
208   public static ICC_Profile getInstance(String filename) throws IOException
209   {
210     return getInstance(new FileInputStream(filename));
211   }
212
213   public static ICC_Profile getInstance(InputStream in) throws IOException
214   {
215     throw new Error("not implemented");
216   }
217
218   public int getMajorVersion()
219   {
220     throw new Error("not implemented");
221   }
222
223   public int getMinorVersion()
224   {
225     throw new Error("not implemented");
226   }
227
228   public int getProfileClass()
229   {
230     throw new Error("not implemented");
231   }
232
233   public int getColorSpaceType()
234   {
235     throw new Error("not implemented");
236   }
237
238   public int getPCSType()
239   {
240     throw new Error("not implemented");
241   }
242
243   public void write(String filename) throws IOException
244   {
245     write(new FileOutputStream(filename));
246   }
247
248   public void write(OutputStream out) throws IOException
249   {
250     throw new Error("not implemented");
251   }
252
253   public byte[] getData()
254   {
255     throw new Error("not implemented");
256   }
257
258   public byte[] getData(int tagSignature)
259   {
260     throw new Error("not implemented");
261   }
262
263   public void setData(int tagSignature, byte[] data)
264   {
265     throw new Error("not implemented");
266   }
267
268   public int getNumComponents()
269   {
270     switch (profileID)
271       {
272       case ColorSpace.CS_sRGB:
273       case ColorSpace.CS_LINEAR_RGB:
274       case ColorSpace.CS_CIEXYZ:
275         return 3;
276       case ColorSpace.CS_GRAY:
277         return 1;
278       case ColorSpace.CS_PYCC: // have no clue about this one
279       default:
280         throw new UnsupportedOperationException("profile not implemented");
281       }
282   }
283
284   protected Object readResolve() throws ObjectStreamException
285   {
286     throw new Error("not implemented");
287   }
288
289   private void readObject(ObjectInputStream s)
290     throws IOException, ClassNotFoundException
291   {
292     throw new Error("not implemented");
293   }
294
295   private void writeObject(ObjectOutputStream s) throws IOException
296   {
297     throw new Error("not implemented");
298   }
299 } // class ICC_Profile