author | serb |
Thu, 31 May 2018 09:52:32 -0700 | |
changeset 50358 | 1ba28f0dbc33 |
parent 48264 | efda6932a433 |
child 52835 | 40281bb2feb6 |
permissions | -rw-r--r-- |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1 |
<!doctype html> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
2 |
<html lang="en"> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
3 |
<head> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
4 |
<meta charset="utf-8"/> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
5 |
<title>TIFF Metadata Format Specification and Usage Notes</title> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
6 |
</head> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
7 |
<!-- |
50358 | 8 |
Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved. |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
9 |
DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
10 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
11 |
This code is free software; you can redistribute it and/or modify it |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
12 |
under the terms of the GNU General Public License version 2 only, as |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
13 |
published by the Free Software Foundation. Oracle designates this |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
14 |
particular file as subject to the "Classpath" exception as provided |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
15 |
by Oracle in the LICENSE file that accompanied this code. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
16 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
17 |
This code is distributed in the hope that it will be useful, but WITHOUT |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
18 |
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
19 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
20 |
version 2 for more details (a copy is included in the LICENSE file that |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
21 |
accompanied this code). |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
22 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
23 |
You should have received a copy of the GNU General Public License version |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
24 |
2 along with this work; if not, write to the Free Software Foundation, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
25 |
Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
26 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
27 |
Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
28 |
or visit www.oracle.com if you need additional information or have any |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
29 |
questions. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
30 |
--> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
31 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
32 |
<body> |
50358 | 33 |
<main role="main"> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
34 |
<h1>TIFF Metadata Format Specification and Usage Notes</h1> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
35 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
36 |
<a href="#Reading">Reading Images</a> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
37 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
38 |
<li><a href="#ColorConversionRead">Color Conversion</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
39 |
<li><a href="#ColorSpacesRead">Color Spaces</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
40 |
<li><a href="#ICCProfilesRead">ICC Profiles</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
41 |
<li><a href="#MetadataIssuesRead">Metadata Issues</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
42 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
43 |
<li><a href="#MapNativeStandard">Native to Standard Metadata Mapping</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
44 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
45 |
</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
46 |
<li><a href="#ExifRead">Reading Exif Images</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
47 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
48 |
<li><a href="#ExifReadTIFF">Reading Uncompressed Exif Images</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
49 |
<li><a href="#ExifReadJPEG">Reading Compressed Exif Images</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
50 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
51 |
</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
52 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
53 |
<a href="#Writing">Writing Images</a><br/> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
54 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
55 |
<li><a href="#Compression">Compression</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
56 |
<li><a href="#ColorConversionWrite">Color Conversion</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
57 |
<li><a href="#ICCProfilesWrite">ICC Profiles</a></li> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
58 |
<li><a href="#MetadataIssuesWrite">Metadata Issues</a> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
59 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
60 |
<li><a href="#MapStandardNative">Standard to Native Metadata Mapping</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
61 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
62 |
<li><a href="#ExifWrite">Writing Exif Images</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
63 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
64 |
<li><a href="#ExifWriteTIFF">Writing Uncompressed Exif Images</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
65 |
<li><a href="#ExifWriteJPEG">Writing Compressed Exif Images</a></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
66 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
67 |
</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
68 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
69 |
<a href="#StreamMetadata">Native Stream Metadata Format</a><br/> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
70 |
<a href="#ImageMetadata">Native Image Metadata Format</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
71 |
|
50358 | 72 |
<h2><a id="Reading">Reading Images</a></h2> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
73 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
74 |
TIFF images are read by an <a href="../../ImageReader.html">ImageReader</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
75 |
which may be controlled by its public interface as well as via a supplied |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
76 |
<a href="../../plugins/tiff/TIFFImageReadParam.html">TIFFImageReadParam</a>. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
77 |
|
50358 | 78 |
<!-- <h3>Supported Image Types</h3> --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
79 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
80 |
<!-- Table? --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
81 |
|
50358 | 82 |
<h3><a id="ColorConversionRead">Color Conversion</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
83 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
84 |
<p>If the source image data |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
85 |
have photometric type CIE L*a*b* or YCbCr, and the destination color space |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
86 |
type is RGB, then the source image data will be automatically converted to |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
87 |
RGB using an internal color converter.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
88 |
|
50358 | 89 |
<h3><a id="ColorSpacesRead">Color Spaces</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
90 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
91 |
The raw color space assigned by default, i.e., in the absence of a |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
92 |
user-supplied <a href="../../ImageTypeSpecifier.html">ImageTypeSpecifier</a>, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
93 |
will be the first among the following which applies: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
94 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
95 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
96 |
<li>A color space created from the <a href="#ICCProfilesRead">ICC Profile</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
97 |
metadata field if it is present and compatible with the image data |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
98 |
layout.</li> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
99 |
<li><a id="nonICCProfile"></a>sRGB if the image is monochrome/bilevel |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
100 |
(a two-level color map is created internally).</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
101 |
<li>sRGB if the image is palette-color.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
102 |
<li>Linear RGB if the image has three samples per pixel, has photometric type |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
103 |
CIE L*a*b*, or has photometric type YCbCr and is <i>not</i> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
104 |
JPEG-compressed.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
105 |
<li>A <a href="#DefaultCMYK">default CMYK color space</a> if the image has |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
106 |
photometric type CMYK and four samples per pixel.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
107 |
<li>Grayscale if the image has one or two samples per pixel and uniformly |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
108 |
1, 2, 4, 8, 16, or 32 bits per sample or is floating point.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
109 |
<li>sRGB if the image has three or four samples per pixel and uniformly |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
110 |
1, 2, 4, 8, 16, or 32 bits per sample or is floating point.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
111 |
<li>A fabricated, <a href="#GenericCS">generic color space</a> if the image |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
112 |
has more than four samples per pixel and the number of bits per sample for |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
113 |
all bands is the same and is a multiple of 8.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
114 |
<li>Grayscale if the image has one or two samples per pixel regardless of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
115 |
the number of bits per sample.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
116 |
<li>sRGB if the image has three or four samples per pixel regardless of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
117 |
the number of bits per sample.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
118 |
<li>A fabricated, <a href="#GenericCS">generic color space</a> if the image |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
119 |
has more than four samples per pixel regardless of the number of bits per |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
120 |
sample.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
121 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
122 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
123 |
<p><a id="DefaultCMYK"></a>The normalized color coordinate transformations |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
124 |
used for the default CMYK color space are defined as follows: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
125 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
126 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
127 |
<li>CMYK to linear RGB |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
128 |
<pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
129 |
R = (1 - K)*(1 - C) |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
130 |
G = (1 - K)*(1 - M) |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
131 |
B = (1 - K)*(1 - Y) |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
132 |
</pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
133 |
</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
134 |
<li>Linear RGB to CMYK |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
135 |
<pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
136 |
K = min{1 - R, 1 - G, 1 - B} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
137 |
if(K != 1) { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
138 |
C = (1 - R - K)/(1 - K) |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
139 |
M = (1 - G - K)/(1 - K) |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
140 |
Y = (1 - B - K)/(1 - K) |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
141 |
} else { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
142 |
C = M = Y = 0 |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
143 |
} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
144 |
</pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
145 |
</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
146 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
147 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
148 |
<p><a id="GenericCS"></a>The generic color space used when no other color space |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
149 |
can be inferred is provided merely to enable the data to be loaded. It is not |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
150 |
intended to provide accurate conversions of any kind.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
151 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
152 |
<p>If the data are known to be in a color space not correctly handled by the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
153 |
foregoing, then an <code>ImageTypeSpecifier</code> should be |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
154 |
supplied to the reader and should be derived from a color space which is correct |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
155 |
for the data in question.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
156 |
|
50358 | 157 |
<h3><a id="ICCProfilesRead">ICC Profiles</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
158 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
159 |
If an ICC profile is contained in the image metadata |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
160 |
(<a href="../../plugins/tiff/BaselineTIFFTagSet.html"> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
161 |
BaselineTIFFTagSet</a>.TAG_ICC_PROFILE, tag number 34675), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
162 |
an attempt will be made to use it to create the color space |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
163 |
of the loaded image. It will be used if the data layout is of component type |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
164 |
and the number of samples per pixel equals or is one greater than the number |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
165 |
of components described by the ICC profile. If the ICC profile is not used |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
166 |
then the color space will be inferred in one of the subsequent steps described |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
167 |
<a href="#nonICCProfile">above</a>. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
168 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
169 |
<p>If for some reason the embedded ICC profile is not used automatically, then |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
170 |
it may be used manually by following this procedure: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
171 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
172 |
<ol> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
173 |
<li>Obtain the image metadata from |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
174 |
<code>ImageReader.getImageMetadata</code></li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
175 |
<li>Extract the ICC profile field and its value.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
176 |
<li>Create an <a href="../../../../java/awt/color/ICC_ColorSpace.html"> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
177 |
ICC_ColorSpace</a> from an |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
178 |
<a href="../../../../java/awt/color/ICC_Profile.html"> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
179 |
ICC_Profile</a> created from the ICC profile field data |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
180 |
using <code>ICC_Profile.getInstance(byte[])</code>.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
181 |
<li>Create an <code>ImageTypeSpecifier</code> from the new color |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
182 |
space using one of its factory methods which accepts an |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
183 |
<code>ICC_ColorSpace</code>. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
184 |
<li>Create a compatible <a href="../../ImageReadParam.html">ImageReadParam</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
185 |
and set the <code>ImageTypeSpecifier</code> using |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
186 |
<code>ImageReadParam.setDestinationType</code>.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
187 |
<li>Pass the parameter object to the appropriate <code>read</code> method.</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
188 |
</ol> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
189 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
190 |
<p>If the inferred color space not based on the ICC Profile field is compatible |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
191 |
with the ICC profile-based color space, then a second |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
192 |
<code>ImageTypeSpecifier</code> derived from this inferred color |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
193 |
space will be included in the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
194 |
<a href="../../../../java/util/Iterator.html">Iterator</a> returned by |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
195 |
<code>ImageReader.getImageTypes</code>. If the iterator contains |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
196 |
more than one type, the first one will be based on the ICC profile and the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
197 |
second on the inferred color space.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
198 |
|
50358 | 199 |
<h3><a id="MetadataIssuesRead">Metadata Issues</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
200 |
|
42749
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
201 |
By default all recognized fields in the TIFF image file directory (IFD) are |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
202 |
loaded into the native image metadata object. Which fields are loaded may be |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
203 |
controlled by setting which TIFF tags the reader is allowed to recognize, |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
204 |
whether to read fields with unrecognized tags, and whether to ignore all |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
205 |
metadata. The reader is informed to disregard all metadata as usual via the |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
206 |
<code>ignoreMetadata</code> parameter of |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
207 |
<code>ImageReader.setInput(Object,boolean,boolean)</code>. It is |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
208 |
informed of which <a href="../../plugins/tiff/TIFFTag.html">TIFFTag</a>s to |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
209 |
recognize or not to recognize via |
42749
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
210 |
<code>TIFFImageReadParam.addAllowedTagSet(TIFFTagSet)</code> and |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
211 |
<code>TIFFImageReadParam.removeAllowedTagSet(TIFFTagSet)</code>. |
42749
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
212 |
If <code>ignoreMetadata</code> is <code>true</code>, then only metadata |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
213 |
essential to reading the image will be loaded into the native image metadata |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
214 |
object. If <code>ignoreMetadata</code> is <code>false</code>, then the reader |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
215 |
will by default load into the native image metadata object only those fields |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
216 |
which are either essential to reading the image or have a <code>TIFFTag</code> |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
217 |
contained in the one of the allowed <code>TIFFTagSet</code>s. Reading of |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
218 |
fields with tags not in the allowed <code>TIFFTagSet</code>s may be forced |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
219 |
by passing in a <code>TIFFImageReadParam</code> on which |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
220 |
<code>TIFFImageReadParam.setReadUnknownTags(boolean)</code> has been |
91fb907a8732
8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way
bpb
parents:
42718
diff
changeset
|
221 |
invoked with parameter <code>true</code>. |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
222 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
223 |
<p>Use of a <a href="../../plugins/tiff/TIFFDirectory.html">TIFFDirectory</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
224 |
object may simplify gaining access to metadata values. An instance of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
225 |
<code>TIFFDirectory</code> may be created from the <code>IIOMetadata</code> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
226 |
object returned by the TIFF reader using the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
227 |
<code>TIFFDirectory.createFromMetadata</code> method.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
228 |
|
50358 | 229 |
<h4><a id="MapNativeStandard"></a> |
230 |
Mapping of TIFF Native Image Metadata to the Standard Metadata Format</h4> |
|
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
231 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
232 |
The derivation of standard metadata format |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
233 |
<a href="standard_metadata.html">javax_imageio_1.0</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
234 |
elements from <a href="#ImageMetadata">TIFF native image metadata</a> is given |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
235 |
in the following table. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
236 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
237 |
<table border="1"> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
238 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
239 |
<th>Standard Metadata Element</th> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
240 |
<th>Derivation from TIFF Fields</th> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
241 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
242 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
243 |
<td>/Chroma/ColorSpaceType@name</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
244 |
<td>PhotometricInterpretation: WhiteIsZero, BlackIsZero, TransparencyMask = |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
245 |
"GRAY"; RGB, PaletteColor => "RGB"; CMYK => "CMYK"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
246 |
YCbCr => "YCbCr"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
247 |
CIELab, ICCLab => "Lab".</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
248 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
249 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
250 |
<td>/Chroma/NumChannels@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
251 |
<td>SamplesPerPixel</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
252 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
253 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
254 |
<td>/Chroma/BlackIsZero@value</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
255 |
<td>"TRUE" <=> PhotometricInterpretation => WhiteIsZero</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
256 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
257 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
258 |
<td>/Chroma/Palette</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
259 |
<td>ColorMap</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
260 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
261 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
262 |
<td>/Compression/CompressionTypeName@value</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
263 |
<td>Compression: Uncompressed => "none"; CCITT 1D => "CCITT |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
264 |
RLE"; |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
265 |
Group 3 Fax => "CCITT T.4"; Group 4 Fax => "CCITT T.6"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
266 |
LZW => "LZW"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
267 |
JPEG => "Old JPEG"; New JPEG => "JPEG"; Zlib =>> "ZLib"; PackBits => |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
268 |
"PackBits"; |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
269 |
Deflate => "Deflate"; Exif JPEG => "JPEG".</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
270 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
271 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
272 |
<td>/Compression/Lossless@value</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
273 |
<td>Compression: JPEG or New JPEG => "FALSE"; otherwise "TRUE".</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
274 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
275 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
276 |
<td>/Data/PlanarConfiguration@value</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
277 |
<td>Chunky => "PixelInterleaved"; Planar => "PlaneInterleaved".</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
278 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
279 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
280 |
<td>/Data/SampleFormat@value</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
281 |
<td>PhotometricInterpretation PaletteColor => "Index"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
282 |
SampleFormat unsigned integer data => "UnsignedIntegral"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
283 |
SampleFormat two's complement signed integer data => "SignedIntegral"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
284 |
SampleFormat IEEE floating point data => "Real"; |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
285 |
otherwise element not emitted. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
286 |
</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
287 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
288 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
289 |
<td>/Data/BitsPerSample@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
290 |
<td>BitsPerSample as a space-separated list.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
291 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
292 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
293 |
<td>/Data/SampleMSB@value</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
294 |
<td>FillOrder: left-to-right => space-separated list of BitsPerSample-1; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
295 |
right-to-left => space-separated list of 0s.</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
296 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
297 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
298 |
<td>/Dimension/PixelAspectRatio@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
299 |
<td>(1/XResolution)/(1/YResolution)</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
300 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
301 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
302 |
<td>/Dimension/ImageOrientation@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
303 |
<td>Orientation</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
304 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
305 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
306 |
<td>/Dimension/HorizontalPixelSize@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
307 |
<td>1/XResolution in millimeters if ResolutionUnit is not None.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
308 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
309 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
310 |
<td>/Dimension/VerticalPixelSize@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
311 |
<td>1/YResolution in millimeters if ResolutionUnit is not None.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
312 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
313 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
314 |
<td>/Dimension/HorizontalPosition@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
315 |
<td>XPosition in millimeters if ResolutionUnit is not None.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
316 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
317 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
318 |
<td>/Dimension/VerticalPosition@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
319 |
<td>YPosition in millimeters if ResolutionUnit is not None.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
320 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
321 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
322 |
<td>/Document/FormatVersion@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
323 |
<td>6.0</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
324 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
325 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
326 |
<td>/Document/SubimageInterpretation@value</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
327 |
<td>NewSubFileType: transparency => "TransparencyMask"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
328 |
reduced-resolution => "ReducedResolution"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
329 |
single page => "SinglePage".</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
330 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
331 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
332 |
<td>/Document/ImageCreationTime@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
333 |
<td>DateTime</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
334 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
335 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
336 |
<td>/Text/TextEntry</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
337 |
<td>DocumentName, ImageDescription, Make, Model, PageName, Software, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
338 |
Artist, HostComputer, InkNames, Copyright: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
339 |
/Text/TextEntry@keyword = field name, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
340 |
/Text/TextEntry@value = field value.<br> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
341 |
Example: TIFF Software field => /Text/TextEntry@keyword = "Software", |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
342 |
/Text/TextEntry@value = Name and version number of the software package(s) |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
343 |
used to create the image.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
344 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
345 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
346 |
<td>/Transparency/Alpha@value</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
347 |
<td>ExtraSamples: associated alpha => "premultiplied"; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
348 |
unassociated alpha => "nonpremultiplied".</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
349 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
350 |
</table> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
351 |
|
50358 | 352 |
<h3><a id="ExifRead">Reading Exif Images</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
353 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
354 |
The TIFF reader may be used to read an uncompressed Exif image or the |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
355 |
contents of the <code>APP1</code> marker segment of a compressed Exif image. |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
356 |
|
50358 | 357 |
<h4><a id="ExifReadTIFF">Reading Uncompressed Exif Images</a></h4> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
358 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
359 |
An uncompressed Exif image is a one- or two-page uncompressed TIFF image |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
360 |
with a specific ordering of its IFD and image data content. Each pixel |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
361 |
has three 8-bit samples with photometric interpretation RGB or YCbCr. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
362 |
The image stream must contain a single primary image and may contain a |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
363 |
single thumbnail which if present must also be uncompressed. The usual |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
364 |
<code>ImageReader</code> methods may be used to read the image |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
365 |
data and metadata: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
366 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
367 |
<pre><code> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
368 |
ImageInputStream input; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
369 |
ImageReader tiffReader; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
370 |
ImageReadParam tiffReadParam; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
371 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
372 |
tiffReader.setInput(input); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
373 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
374 |
// Read primary image and IFD. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
375 |
BufferedImage image = tiffReader.read(0, tiffReadParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
376 |
IIOMetadata primaryIFD = tiffReader.getImageMetadata(0); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
377 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
378 |
// Read thumbnail if present. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
379 |
BufferedImage thumbnail = null; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
380 |
if (tiffReader.getNumImages(true) > 1) { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
381 |
thumbnail = tiffReader.read(1, tiffReadParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
382 |
} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
383 |
</code></pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
384 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
385 |
Note that the Exif thumbnail is treated as a separate page in the TIFF |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
386 |
stream and not as a thumbnail, i.e., |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
387 |
<code>tiffReader.hasThumbnails(0)</code> will return <code>false</code>. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
388 |
|
50358 | 389 |
<h4><a id="ExifReadJPEG">Reading Compressed Exif Images</a></h4> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
390 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
391 |
A compressed Exif image is a 3-band ISO/IEC 10918-1 baseline DCT JPEG stream |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
392 |
with an inserted <code>APP1</code> marker segment. The parameters of the marker |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
393 |
segment after the length are the 6-byte sequence |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
394 |
<code>{'E', 'x', 'i', 'f', 0x00, 0x00}</code> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
395 |
followed by a complete TIFF stream. The embedded TIFF stream contains a primary |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
396 |
IFD describing the JPEG image optionally followed by a thumbnail IFD and |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
397 |
compressed or uncompressed thumbnail image data. Note that the embedded TIFF |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
398 |
stream does not contain any image data associated with the primary IFD |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
399 |
nor any descriptive fields which duplicate information found in the JPEG |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
400 |
stream itself. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
401 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
402 |
<p>The parameter content of the <code>APP1</code> marker segment may be obtained |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
403 |
from the user object of the associated <code>Node</code> in a |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
404 |
<code>javax_imageio_jpeg_image_1.0</code> native image metadata tree extracted |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
405 |
from the image metadata object returned by the JPEG reader. This APP1 Exif |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
406 |
node will be a child of the node named "markerSequence" and will |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
407 |
have name <code>unknown</code> and an attribute named <code>MarkerTag</code> with |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
408 |
integral value <code>0xE1</code> (<code>String</code> value |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
409 |
<code>"225"</code>). The user object of this node will be a byte array |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
410 |
which starts with the six bytes <code>{'E', 'x', 'i', 'f', '0', '0'}</code>. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
411 |
The primary IFD and the thumbnail IFD and image may be |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
412 |
read from the user object by the usual <code>ImageReader</code> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
413 |
methods: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
414 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
415 |
<pre><code> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
416 |
ImageReader jpegReader; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
417 |
ImageReader tiffReader; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
418 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
419 |
// Obtain the APP1 Exif marker data from the JPEG image metadata. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
420 |
IIOMetadata jpegImageMetadata = jpegReader.getImageMetadata(0); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
421 |
String nativeFormat = jpegImageMetadata.getNativeMetadataFormatName(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
422 |
Node jpegImageMetadataTree = jpegImageMetadata.getAsTree(nativeFormat); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
423 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
424 |
// getExifMarkerData() returns the byte array which is the user object |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
425 |
// of the APP1 Exif marker node. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
426 |
byte[] app1Params = getExifMarkerData(jpegImageMetadataTree); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
427 |
if (app1Params == null) { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
428 |
throw new IIOException("APP1 Exif marker not found."); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
429 |
} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
430 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
431 |
// Set up input, skipping Exif ID 6-byte sequence. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
432 |
MemoryCacheImageInputStream app1ExifInput |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
433 |
= new MemoryCacheImageInputStream |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
434 |
(new ByteArrayInputStream(app1Params, 6, app1Params.length - 6)); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
435 |
tiffReader.setInput(app1ExifInput); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
436 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
437 |
// Read primary IFD. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
438 |
IIOMetadata primaryIFD = tiffReader.getImageMetadata(0); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
439 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
440 |
// Read thumbnail if present. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
441 |
BufferedImage thumbnail = null; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
442 |
if (tiffReader.getNumImages(true) > 1) { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
443 |
thumbnail = tiffReader.read(1, tiffReadParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
444 |
} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
445 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
446 |
// Read the primary image. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
447 |
BufferedImage image = jpegReader.read(0); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
448 |
</code></pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
449 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
450 |
Note that <code>tiffReader.getNumImages(true)</code> returns the number of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
451 |
IFDs in the embedded TIFF stream including those corresponding to empty |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
452 |
images. Calling <code>tiffReader.read(0, readParam)</code> will throw |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
453 |
an exception as the primary image in the embedded TIFF stream is always |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
454 |
empty; the primary image should be obtained using the JPEG reader itself. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
455 |
|
50358 | 456 |
<h2><a id="Writing">Writing Images</a></h2> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
457 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
458 |
TIFF images are written by a <a href="../../ImageWriter.html">ImageWriter</a> which may be |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
459 |
controlled by its public interface as well as via a supplied |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
460 |
<a href="../../ImageWriteParam.html">ImageWriteParam</a>. For an <code>ImageWriteParam</code> returned |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
461 |
by the <code>getDefaultWriteParam()</code> method of the TIFF <code>ImageWriter</code>, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
462 |
the <code>canWriteTiles()</code> and <code>canWriteCompressed()</code> methods |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
463 |
will return <code>true</code>; the <code>canOffsetTiles()</code> and |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
464 |
<code>canWriteProgressive()</code> methods will return <code>false</code>. |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
465 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
466 |
The TIFF writer supports many optional capabilities including writing tiled |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
467 |
images, inserting images, writing or inserting empty images, and replacing image |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
468 |
data. Pixels may be replaced in either empty or non-empty images but if and |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
469 |
only if the data are not compressed. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
470 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
471 |
<p> If tiles are being written, then each of their dimensions will be |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
472 |
rounded to the nearest multiple of 16 per the TIFF specification. If |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
473 |
JPEG-in-TIFF compression is being used, and tiles are being written |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
474 |
each tile dimension will be rounded to the nearest multiple of 8 times |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
475 |
the JPEG minimum coded unit (MCU) in that dimension. If JPEG-in-TIFF |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
476 |
compression is being used and strips are being written, the number of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
477 |
rows per strip is rounded to a multiple of 8 times the maximum MCU over |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
478 |
both dimensions.</p> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
479 |
|
50358 | 480 |
<!-- <h3>Supported Image Types</h3> --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
481 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
482 |
<!-- Table? --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
483 |
|
50358 | 484 |
<h3><a id="Compression">Compression</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
485 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
486 |
The compression type may be set via the <code>setCompressionType()</code> method of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
487 |
the <code>ImageWriteParam</code> after setting the compression mode to |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
488 |
<code>MODE_EXPLICIT</code>. The set of innately |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
489 |
supported compression types is listed in the following table: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
490 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
491 |
<table border=1> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
492 |
<caption><b>Supported Compression Types</b></caption> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
493 |
<tr><th>Compression Type</th> <th>Description</th> <th>Reference</th></tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
494 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
495 |
<td>CCITT RLE</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
496 |
<td>Modified Huffman compression</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
497 |
<td>TIFF 6.0 Specification, Section 10</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
498 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
499 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
500 |
<td>CCITT T.4</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
501 |
<td>CCITT T.4 bilevel encoding/Group 3 facsimile compression</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
502 |
<td>TIFF 6.0 Specification, Section 11</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
503 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
504 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
505 |
<td>CCITT T.6</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
506 |
<td>CCITT T.6 bilevel encoding/Group 4 facsimile compression</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
507 |
<td>TIFF 6.0 Specification, Section 11</td></tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
508 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
509 |
<td>LZW</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
510 |
<td>LZW compression</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
511 |
<td>TIFF 6.0 Specification, Section 13</td></tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
512 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
513 |
<td>JPEG</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
514 |
<td>"New" JPEG-in-TIFF compression</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
515 |
<td><a href="ftp://ftp.sgi.com/graphics/tiff/TTN2.draft.txt">TIFF |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
516 |
Technical Note #2</a></td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
517 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
518 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
519 |
<td>ZLib</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
520 |
<td>"Deflate/Inflate" compression (see note following this table)</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
521 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
522 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
523 |
<td>PackBits</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
524 |
<td>Byte-oriented, run length compression</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
525 |
<td>TIFF 6.0 Specification, Section 9</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
526 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
527 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
528 |
<td>Deflate</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
529 |
<td>"Zip-in-TIFF" compression (see note following this table)</td> |
42718
96221842d2f1
8170142: Broken links in TIFF metadata format and usage notes
bpb
parents:
35302
diff
changeset
|
530 |
<td><a href="https://tools.ietf.org/html/rfc1950"> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
531 |
ZLIB Compressed Data Format Specification</a>, |
42718
96221842d2f1
8170142: Broken links in TIFF metadata format and usage notes
bpb
parents:
35302
diff
changeset
|
532 |
<a href="https://tools.ietf.org/html/rfc1951"> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
533 |
DEFLATE Compressed Data Format Specification</a></td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
534 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
535 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
536 |
<td>Exif JPEG</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
537 |
<td>Exif-specific JPEG compression (see note following this table)</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
538 |
<td><a href="http://www.exif.org/Exif2-2.PDF">Exif 2.2 Specification</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
539 |
(PDF), section 4.5.5, "Basic Structure of Thumbnail Data"</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
540 |
</table> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
541 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
542 |
<p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
543 |
Old-style JPEG compression as described in section 22 of the TIFF 6.0 |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
544 |
Specification is <i>not</i> supported. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
545 |
</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
546 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
547 |
<p> The CCITT compression types are applicable to bilevel (1-bit) |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
548 |
images only. The JPEG compression type is applicable to byte |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
549 |
grayscale (1-band) and RGB (3-band) images only.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
550 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
551 |
<p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
552 |
ZLib and Deflate compression are identical except for the value of the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
553 |
TIFF Compression field: for ZLib the Compression field has value 8 |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
554 |
whereas for Deflate it has value 32946 (0x80b2). In both cases each |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
555 |
image segment (strip or tile) is written as a single complete zlib data |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
556 |
stream. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
557 |
</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
558 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
559 |
<p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
560 |
"Exif JPEG" is a compression type used when writing the contents of an |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
561 |
APP1 Exif marker segment for inclusion in a JPEG native image metadata |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
562 |
tree. The contents appended to the output when this compression type is |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
563 |
used are a function of whether an empty or non-empty image is written. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
564 |
If the image is empty, then a TIFF IFD adhering to the specification of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
565 |
a compressed Exif primary IFD is appended. If the image is non-empty, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
566 |
then a complete IFD and image adhering to the specification of a |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
567 |
compressed Exif thumbnail IFD and image are appended. Note that the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
568 |
data of the empty image may <i>not</i> later be appended using the pixel |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
569 |
replacement capability of the TIFF writer. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
570 |
</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
571 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
572 |
<p> If ZLib/Deflate or JPEG compression is used, the compression quality |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
573 |
may be set. For ZLib/Deflate the supplied floating point quality value is |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
574 |
rescaled to the range <code>[1, 9]</code> and truncated to an integer |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
575 |
to derive the Deflate compression level. For JPEG the floating point |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
576 |
quality value is passed directly to the JPEG writer plug-in which |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
577 |
interprets it in the usual way.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
578 |
|
50358 | 579 |
<h3><a id="ColorConversionWrite">Color Conversion</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
580 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
581 |
<p>If the source image data |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
582 |
color space type is RGB, and the destination photometric type is CIE L*a*b* or |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
583 |
YCbCr, then the source image data will be automatically converted from |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
584 |
RGB using an internal color converter.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
585 |
|
50358 | 586 |
<h3><a id="ICCProfilesWrite">ICC Profiles</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
587 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
588 |
An <code>ICC Profile</code> field will be written if either: |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
589 |
<ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
590 |
<li>one is present in the native image metadata |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
591 |
<a href="../IIOMetadata.html">IIOMetadata</a> instance supplied to the writer, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
592 |
or</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
593 |
<li>the <a href="../../../../java/awt/color/ColorSpace.html">ColorSpace</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
594 |
of the destination <code>ImageTypeSpecifier</code> is an instance of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
595 |
<code>ICC_ColorSpace</code> which is not one of the standard |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
596 |
color spaces defined by the <code>CS_*</code> constants in the |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
597 |
<code>ColorSpace</code> class. The destination type is set via |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
598 |
<code>ImageWriteParam.setDestinationType(ImageTypeSpecifier)</code> and defaults |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
599 |
to the <code>ImageTypeSpecifier</code> of the image being written. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
600 |
</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
601 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
602 |
|
50358 | 603 |
<h3><a id="MetadataIssuesWrite">Metadata Issues</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
604 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
605 |
Some behavior of the writer is affected by or may affect the contents of |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
606 |
the image metadata which may be supplied by the user. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
607 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
608 |
<p>For bilevel images, the <code>FillOrder</code>, and <code>T4Options</code> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
609 |
fields affect the output data. The data will be filled right-to-left if |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
610 |
<code>FillOrder</code> is present with a value of 2 |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
611 |
(<code>BaselineTIFFTagSet.FILL_ORDER_RIGHT_TO_LEFT</code>) |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
612 |
and will be filled left-to-right otherwise. The value of <code>T4Options</code> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
613 |
specifies whether the data should be 1D- or 2D-encoded and whether EOL |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
614 |
padding should be used.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
615 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
616 |
<p>For all images the value of the <code>RowsPerStrip</code> field is used |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
617 |
to the set the number of rows per strip if the image is not tiled. The |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
618 |
default number of rows per strip is either 8 or the number of rows which |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
619 |
would fill no more than 8 kilobytes, whichever is larger.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
620 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
621 |
<p>For all images the tile dimensions may be set using the <code>TileWidth</code> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
622 |
and <code>TileLength</code> field values if the tiling mode is |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
623 |
<code>ImageWriteParam.MODE_COPY_FROM_METADATA</code>. If this mode |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
624 |
is set but the fields are not, their respective default values are the image |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
625 |
width and height.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
626 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
627 |
<p>When using JPEG-in-TIFF compression, a <code>JPEGTables</code> field will be |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
628 |
written to the IFD and abbreviated JPEG streams to each strip or tile if and |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
629 |
only if a <code>JPEGTables</code> field is contained in the metadata object |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
630 |
provided to the writer. If the contents of the <code>JPEGTables</code> field is |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
631 |
a valid tables-only JPEG stream, then it will be used; otherwise the contents |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
632 |
of the field will be replaced with default visually lossless tables. If no |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
633 |
such <code>JPEGTables</code> field is present in the metadata, then no |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
634 |
<code>JPEGTables</code> field will be written to the output and each strip or |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
635 |
tile will be written as a separate, self-contained JPEG stream.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
636 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
637 |
<p>When using Deflate/ZLib or LZW compression, if the image has 8 bits per |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
638 |
sample, a horizontal differencing predictor will be used if the |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
639 |
<code>Predictor</code> field is present with a value of 2 |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
640 |
(<code>BaselineTIFFTagSet.PREDICTOR_HORIZONTAL_DIFFERENCING</code>). |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
641 |
If prediction is so requested but the image does not have |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
642 |
8 bits per sample the field will be reset to have the value 1 |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
643 |
(<code>BaselineTIFFTagSet.PREDICTOR_NONE</code>). |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
644 |
</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
645 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
646 |
<p>Some fields may be added or modified: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
647 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
648 |
<ul> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
649 |
<li><code>PhotometricInterpretation</code> if not present.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
650 |
<li><code>PlanarConfiguration</code> if this field is present with value |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
651 |
<code>Planar</code> is is reset to <code>Chunky</code>.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
652 |
<li><code>Compression</code> always.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
653 |
<li><code>BitsPerSample</code> if the image is not bilevel.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
654 |
<li><code>SamplesPerPixel</code> always.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
655 |
<li><code>ExtraSamples</code> if an alpha channel is present.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
656 |
<li><code>SampleFormat</code> if not present and the data are 16- or 32-bit |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
657 |
integers or floating point.</li> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
658 |
<li><code>ColorMap</code> if the <code>PhotometricInterpretation</code> is |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
659 |
<code>RGBPalette</code>.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
660 |
<li><code>ImageWidth</code> and <code>ImageLength</code> always.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
661 |
<li><code>TileWidth</code>, <code>TileLength</code>, <code>TileOffsets</code>, and |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
662 |
<code>TileByteCounts</code> if a tiled image is being written.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
663 |
<li><code>RowsPerStrip</code>, <code>StripOffsets</code>, and <code>StripByteCounts</code> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
664 |
if a tiled image is <i>not</i> being written.</li> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
665 |
<li><code>XResolution</code>, <code>YResolution</code>, and <code>ResolutionUnit</code> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
666 |
if none of these is present.</li> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
667 |
<li><code>YCbCrSubsampling</code> and <code>YCbCrPositioning</code> if the |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
668 |
photometric interpretation is YCbCr and the compression type is not JPEG |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
669 |
(only [1, 1] subsampling and cosited positioning are supported for |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
670 |
non-JPEG YCbCr output).</li> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
671 |
<li><code>YCbCrSubsampling</code>, <code>YCbCrPositioning</code>, and |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
672 |
<code>ReferenceBlackWhite</code>: if the compression type is JPEG and the color |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
673 |
space is RGB these will be reset to [2, 2] centered subsampling with no |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
674 |
headroom/footroom (0:255,128:255,128:255).</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
675 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
676 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
677 |
<p>Some fields may be removed: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
678 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
679 |
<ul> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
680 |
<li><code>BitsPerSample</code> if the image is bilevel.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
681 |
<li><code>ExtraSamples</code> if the image does not have an alpha channel.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
682 |
<li><code>ColorMap</code> if the photometric interpretation is not |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
683 |
<code>RGBPalette</code>.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
684 |
<li><code>TileWidth</code>, <code>TileLength</code>, <code>TileOffsets</code>, and |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
685 |
<code>TileByteCounts</code> if tiling <i>is not</i> being used.</li> |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
686 |
<li><code>RowsPerStrip</code>, <code>StripOffsets</code>, and <code>StripByteCounts</code> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
687 |
if tiling <i>is</i> being used.</li> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
688 |
<li><code>YCbCrSubsampling</code>, <code>YCbCrPositioning</code>, and |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
689 |
<code>ReferenceBlackWhite</code> if the compression type is JPEG and the |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
690 |
color space is grayscale.</li> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
691 |
<li><code>JPEGProc</code>, <code>JPEGInterchangeFormat</code>, |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
692 |
<code>JPEGInterchangeFormatLength</code>, <code>JPEGRestartInterval</code>, |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
693 |
<code>JPEGLosslessPredictors</code>, <code>JPEGPointTransforms</code>, |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
694 |
<code>JPEGQTables</code>, <code>JPEGDCTables</code>, and |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
695 |
<code>JPEGACTables</code> if the compression type is JPEG.</li> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
696 |
</ul> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
697 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
698 |
<p>Other fields present in the supplied metadata are uninterpreted and will |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
699 |
be written as supplied.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
700 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
701 |
<p>If an Exif image is being written, the set of fields present and their |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
702 |
values will be modified such that the result is in accord with the Exif 2.2 |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
703 |
specification.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
704 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
705 |
<p>Setting up the image metadata to write to a TIFF stream may be simplified |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
706 |
by using the <code>TIFFDirectory</code> class |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
707 |
which represents a TIFF IFD. A field in a TIFF IFD is represented by an |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
708 |
instance of <a href="../../plugins/tiff/TIFFField.html">TIFFField</a>. For each |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
709 |
field to be written a <code>TIFFField</code> may be added to the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
710 |
<code>TIFFDirectory</code> and the latter converted to an |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
711 |
<code>IIOMetadata</code> object by invoking |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
712 |
<code>TIFFDirectory.getAsMetadata</code>. The |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
713 |
<code>IIOMetadata</code> object so obtained may then be passed to the TIFF |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
714 |
writer.</p> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
715 |
|
50358 | 716 |
<h4><a id="MapStandardNative"></a> |
717 |
Mapping of the Standard Metadata Format to TIFF Native Image Metadata</h4> |
|
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
718 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
719 |
The derivation of <a href="#ImageMetadata">TIFF native image metadata</a> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
720 |
elements from the standard metadata format |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
721 |
<a href="standard_metadata.html">javax_imageio_1.0</a> is |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
722 |
given in the following table. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
723 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
724 |
<table border="1"> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
725 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
726 |
<th>TIFF Field</th> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
727 |
<th>Derivation from Standard Metadata Elements</th> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
728 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
729 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
730 |
<td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
731 |
PhotometricInterpretation |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
732 |
</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
733 |
<td>/Chroma/ColorSpaceType@name: "GRAY" and /Chroma/BlackIsZero@value = "FALSE" |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
734 |
=> WhiteIsZero; "GRAY" and /Document/SubimageInterpretation@value = |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
735 |
"TransparencyMask" => TransparencyMask; "RGB" and /Chroma/Palette present => |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
736 |
PaletteColor; "GRAY" => BlackIsZero; "RGB" => RGB; "YCbCr" => YCbCr; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
737 |
"CMYK" => CMYK; "Lab" => CIELab.</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
738 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
739 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
740 |
<td>SamplesPerPixel</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
741 |
<td>/Chroma/NumChannels@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
742 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
743 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
744 |
<td>ColorMap</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
745 |
<td>/Chroma/Palette</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
746 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
747 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
748 |
<td>Compression</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
749 |
<td>/Compression/CompressionTypeName@value: "none" => Uncompressed; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
750 |
"CCITT RLE" => CCITT 1D; "CCITT T.4" => Group 3 Fax; "CCITT T.6" => Group 4 |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
751 |
Fax; "LZW" => LZW; "Old JPEG" => JPEG; "JPEG" => New JPEG; "ZLib" => ZLib; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
752 |
"PackBits" => PackBits; "Deflate" => Deflate.</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
753 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
754 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
755 |
<td>PlanarConfiguration</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
756 |
<td>/Data/PlanarConfiguration@value: "PixelInterleaved" => Chunky; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
757 |
"PlaneInterleaved" => Planar.</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
758 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
759 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
760 |
<td>SampleFormat</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
761 |
<td>/Data/SampleFormat@value: "SignedIntegral" => two's complement signed |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
762 |
integer data; "UnsignedIntegral" => unsigned integer data; "Real" => |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
763 |
IEEE floating point data; "Index" => unsigned integer data. |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
764 |
</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
765 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
766 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
767 |
<td>BitsPerSample</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
768 |
<td>/Data/BitsPerSample@value: space-separated list parsed to char array.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
769 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
770 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
771 |
<td>FillOrder</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
772 |
<td>/Data/SampleMSB@value: if all values in space-separated list are 0s => |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
773 |
right-to-left; otherwise => left-to-right. |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
774 |
</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
775 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
776 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
777 |
<td>XResolution</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
778 |
<td>(10 / /Dimension/HorizontalPixelSize@value) or |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
779 |
(10 / (/Dimension/VerticalPixelSize@value * |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
780 |
/Dimension/PixelAspectRatio@value))</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
781 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
782 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
783 |
<td>YResolution</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
784 |
<td>(10 / /Dimension/VerticalPixelSize@value) or |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
785 |
(10 / (/Dimension/HorizontalPixelSize@value / |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
786 |
/Dimension/PixelAspectRatio@value))</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
787 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
788 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
789 |
<td>ResolutionUnit</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
790 |
<td>Centimeter if XResolution or YResolution set; otherwise None.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
791 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
792 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
793 |
<td>Orientation</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
794 |
<td>/Dimension/ImageOrientation@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
795 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
796 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
797 |
<td>XPosition</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
798 |
<td>/Dimension/HorizontalPosition@value / 10</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
799 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
800 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
801 |
<td>YPosition</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
802 |
<td>/Dimension/VerticalPosition@value / 10</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
803 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
804 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
805 |
<td>NewSubFileType</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
806 |
<td>/Document/SubimageInterpretation@value: "TransparencyMask" => |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
807 |
transparency mask; "ReducedResolution" => reduced-resolution; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
808 |
"SinglePage" => single page.</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
809 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
810 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
811 |
<td>DateTime</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
812 |
<td>/Document/ImageCreationTime@value</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
813 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
814 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
815 |
<td>DocumentName, ImageDescription, Make, Model, PageName, Software, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
816 |
Artist, HostComputer, InkNames, Copyright</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
817 |
<td>/Text/TextEntry: if /Text/TextEntry@keyword is the name of any of the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
818 |
TIFF Fields, e.g., "Software", then the field is added with content |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
819 |
/Text/TextEntry@value and count 1.</td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
820 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
821 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
822 |
<td>ExtraSamples</td> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
823 |
<td>/Transparency/Alpha@value: "premultiplied" => associated alpha, count 1; |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
824 |
"nonpremultiplied" => unassociated alpha, count 1.</td> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
825 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
826 |
<tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
827 |
<td></td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
828 |
<td></td> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
829 |
</tr> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
830 |
</table> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
831 |
|
50358 | 832 |
<h3><a id="ExifWrite">Writing Exif Images</a></h3> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
833 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
834 |
The TIFF writer may be used to write an uncompressed Exif image or the |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
835 |
contents of the <code>APP1</code> marker segment of a compressed Exif image. |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
836 |
|
50358 | 837 |
<h4><a id="ExifWriteTIFF">Writing Uncompressed Exif Images</a></h4> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
838 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
839 |
When writing a sequence of images each image is normally recorded as |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
840 |
{IFD, IFD Value, Image Data}. The Exif specification requires |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
841 |
that an uncompressed Exif image be structured as follows: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
842 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
843 |
<a id="ExifStructure"></a> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
844 |
<ol> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
845 |
<li>Image File Header</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
846 |
<li>Primary IFD</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
847 |
<li>Primary IFD Value</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
848 |
<li>Thumbnail IFD</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
849 |
<li>Thumbnail IFD Value</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
850 |
<li>Thumbnail Image Data</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
851 |
<li>Primary Image Data</li> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
852 |
</ol> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
853 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
854 |
To meet the requirement of the primary image data being recorded last, the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
855 |
primary image must be written initially as an empty image and have its data |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
856 |
added via pixel replacement after the thumbnail IFD and image data have been |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
857 |
written: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
858 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
859 |
<pre><code> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
860 |
ImageWriter tiffWriter; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
861 |
ImageWriteParam tiffWriteParam; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
862 |
IIOMetadata tiffStreamMetadata; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
863 |
IIOMetadata primaryIFD; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
864 |
BufferedImage image; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
865 |
BufferedImage thumbnail; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
866 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
867 |
// Specify uncompressed output. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
868 |
tiffWriteParam.setCompressionMode(ImageWriteParam.MODE_DISABLED); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
869 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
870 |
if (thumbnail != null) { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
871 |
// Write the TIFF header. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
872 |
tiffWriter.prepareWriteSequence(tiffStreamMetadata); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
873 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
874 |
// Append the primary IFD. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
875 |
tiffWriter.prepareInsertEmpty(-1, // append |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
876 |
new ImageTypeSpecifier(image), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
877 |
image.getWidth(), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
878 |
image.getHeight(), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
879 |
primaryIFD, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
880 |
null, // thumbnails |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
881 |
tiffWriteParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
882 |
tiffWriter.endInsertEmpty(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
883 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
884 |
// Append the thumbnail image data. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
885 |
tiffWriter.writeToSequence(new IIOImage(thumbnail, null, null), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
886 |
tiffWriteParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
887 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
888 |
// Insert the primary image data. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
889 |
tiffWriter.prepareReplacePixels(0, new Rectangle(image.getWidth(), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
890 |
image.getHeight())); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
891 |
tiffWriter.replacePixels(image, tiffWriteParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
892 |
tiffWriter.endReplacePixels(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
893 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
894 |
// End writing. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
895 |
tiffWriter.endWriteSequence(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
896 |
} else { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
897 |
// Write only the primary IFD and image data. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
898 |
tiffWriter.write(tiffStreamMetadata, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
899 |
new IIOImage(image, null, primaryIFD), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
900 |
tiffWriteParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
901 |
} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
902 |
</code></pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
903 |
|
50358 | 904 |
<h4><a id="ExifWriteJPEG">Writing Compressed Exif Images</a></h4> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
905 |
|
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
906 |
The structure of the embedded TIFF stream in the <code>APP1</code> segment of a |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
907 |
compressed Exif image is identical to the <a href="#ExifStructure"> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
908 |
uncompressed Exif image structure</a> except that there are no primary |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
909 |
image data, i.e., the primary IFD does not refer to any image data. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
910 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
911 |
<pre><code> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
912 |
ImageWriter tiffWriter; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
913 |
ImageWriteParam tiffWriteParam; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
914 |
IIOMetadata tiffStreamMetadata; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
915 |
BufferedImage image; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
916 |
BufferedImage thumbnail; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
917 |
IIOMetadata primaryIFD; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
918 |
ImageOutputStream output; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
919 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
920 |
// Set up an output to contain the APP1 Exif TIFF stream. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
921 |
ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
922 |
MemoryCacheImageOutputStream app1ExifOutput = |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
923 |
new MemoryCacheImageOutputStream(baos); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
924 |
tiffWriter.setOutput(app1ExifOutput); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
925 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
926 |
// Set compression for the thumbnail. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
927 |
tiffWriteParam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
928 |
tiffWriteParam.setCompressionType("Exif JPEG"); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
929 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
930 |
// Write the APP1 Exif TIFF stream. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
931 |
if (thumbnail != null) { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
932 |
// Write the TIFF header. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
933 |
tiffWriter.prepareWriteSequence(tiffStreamMetadata); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
934 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
935 |
// Append the primary IFD. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
936 |
tiffWriter.prepareInsertEmpty(-1, // append |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
937 |
new ImageTypeSpecifier(image), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
938 |
image.getWidth(), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
939 |
image.getHeight(), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
940 |
primaryIFD, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
941 |
null, // thumbnails |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
942 |
tiffWriteParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
943 |
tiffWriter.endInsertEmpty(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
944 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
945 |
// Append the thumbnail IFD and image data. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
946 |
tiffWriter.writeToSequence(new IIOImage(thumbnail, null, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
947 |
null), tiffWriteParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
948 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
949 |
// End writing. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
950 |
tiffWriter.endWriteSequence(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
951 |
} else { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
952 |
// Write only the primary IFD. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
953 |
tiffWriter.prepareWriteEmpty(tiffStreamMetadata, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
954 |
new ImageTypeSpecifier(image), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
955 |
image.getWidth(), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
956 |
image.getHeight(), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
957 |
primaryIFD, |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
958 |
null, // thumbnails |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
959 |
tiffWriteParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
960 |
tiffWriter.endWriteEmpty(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
961 |
} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
962 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
963 |
// Flush data into byte stream. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
964 |
app1ExifOutput.flush(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
965 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
966 |
// Create APP1 parameter array. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
967 |
byte[] app1Parameters = new byte[6 + baos.size()]; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
968 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
969 |
// Add APP1 Exif ID bytes. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
970 |
app1Parameters[0] = (byte) 'E'; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
971 |
app1Parameters[1] = (byte) 'x'; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
972 |
app1Parameters[2] = (byte) 'i'; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
973 |
app1Parameters[3] = (byte) 'f'; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
974 |
app1Parameters[4] = app1Parameters[5] = (byte) 0; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
975 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
976 |
// Append TIFF stream to APP1 parameters. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
977 |
System.arraycopy(baos.toByteArray(), 0, app1Parameters, 6, baos.size()); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
978 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
979 |
// Create the APP1 Exif node to be added to native JPEG image metadata. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
980 |
IIOMetadataNode app1Node = new IIOMetadataNode("unknown"); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
981 |
app1Node.setAttribute("MarkerTag", String.valueOf(0xE1)); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
982 |
app1Node.setUserObject(app1Parameters); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
983 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
984 |
// Append the APP1 Exif marker to the "markerSequence" node. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
985 |
IIOMetadata jpegImageMetadata = |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
986 |
jpegWriter.getDefaultImageMetadata(new ImageTypeSpecifier(image), |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
987 |
jpegWriteParam); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
988 |
String nativeFormat = jpegImageMetadata.getNativeMetadataFormatName(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
989 |
Node tree = jpegImageMetadata.getAsTree(nativeFormat); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
990 |
NodeList children = tree.getChildNodes(); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
991 |
int numChildren = children.getLength(); |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
992 |
for (int i = 0; i < numChildren; i++) { |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
993 |
Node child = children.item(i); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
994 |
if (child.getNodeName().equals("markerSequence")) { |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
995 |
child.appendChild(app1Node); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
996 |
break; |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
997 |
} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
998 |
} |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
999 |
jpegImageMetadata.setFromTree(nativeFormat, tree); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1000 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1001 |
// Write the JPEG image data including the APP1 Exif marker. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1002 |
jpegWriter.setOutput(output); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1003 |
jpegWriter.write(new IIOImage(image, null, jpegImageMetadata)); |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1004 |
</code></pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1005 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1006 |
The <code>"unknown"</code> node created above would be appended to the |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1007 |
<code>"markerSequence"</code> node of the native JPEG image metadata |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1008 |
and written to the JPEG stream when the primary image is written using |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1009 |
the JPEG writer. |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1010 |
|
50358 | 1011 |
<h2><a id="StreamMetadata">Stream Metadata</a></h2> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1012 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1013 |
The DTD for the TIFF native stream metadata format is as follows: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1014 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1015 |
<pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1016 |
<!DOCTYPE "javax_imageio_tiff_stream_1.0" [ |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1017 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1018 |
<!ELEMENT "javax_imageio_tiff_stream_1.0" (ByteOrder)> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1019 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1020 |
<!ELEMENT "ByteOrder" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1021 |
<!-- The stream byte order --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1022 |
<!ATTLIST "ByteOrder" "value" #CDATA #REQUIRED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1023 |
<!-- One of "BIG_ENDIAN" or "LITTLE_ENDIAN" --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1024 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1025 |
]> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1026 |
</pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1027 |
|
50358 | 1028 |
<h2><a id="ImageMetadata">Image Metadata</a></h2> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1029 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1030 |
The DTD for the TIFF native image metadata format is as follows: |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1031 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1032 |
<pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1033 |
<!DOCTYPE "javax_imageio_tiff_image_1.0" [ |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1034 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1035 |
<!ELEMENT "javax_imageio_tiff_image_1.0" (TIFFIFD)*> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1036 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1037 |
<!ELEMENT "TIFFIFD" (TIFFField | TIFFIFD)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1038 |
<!-- An IFD (directory) containing fields --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1039 |
<!ATTLIST "TIFFIFD" "tagSets" #CDATA #REQUIRED> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1040 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1041 |
<!ATTLIST "TIFFIFD" "parentTagNumber" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1042 |
<!-- The tag number of the field pointing to this IFD --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1043 |
<!-- Data type: Integer --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1044 |
<!ATTLIST "TIFFIFD" "parentTagName" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1045 |
<!-- A mnemonic name for the field pointing to this IFD, if known |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1046 |
--> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1047 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1048 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1049 |
<!ELEMENT "TIFFField" (TIFFBytes | TIFFAsciis | |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1050 |
TIFFShorts | TIFFSShorts | TIFFLongs | TIFFSLongs | |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1051 |
TIFFRationals | TIFFSRationals | |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1052 |
TIFFFloats | TIFFDoubles | TIFFUndefined)> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1053 |
<!-- A field containing data --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1054 |
<!ATTLIST "TIFFField" "number" #CDATA #REQUIRED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1055 |
<!-- The tag number asociated with the field --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1056 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1057 |
<!ATTLIST "TIFFField" "name" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1058 |
<!-- A mnemonic name associated with the field, if known --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1059 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1060 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1061 |
<!ELEMENT "TIFFBytes" (TIFFByte)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1062 |
<!-- A sequence of TIFFByte nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1063 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1064 |
<!ELEMENT "TIFFByte" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1065 |
<!-- An integral value between 0 and 255 --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1066 |
<!ATTLIST "TIFFByte" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1067 |
<!-- The value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1068 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1069 |
<!ATTLIST "TIFFByte" "description" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1070 |
<!-- A description, if available --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1071 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1072 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1073 |
<!ELEMENT "TIFFAsciis" (TIFFAscii)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1074 |
<!-- A sequence of TIFFAscii nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1075 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1076 |
<!ELEMENT "TIFFAscii" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1077 |
<!-- A String value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1078 |
<!ATTLIST "TIFFAscii" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1079 |
<!-- The value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1080 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1081 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1082 |
<!ELEMENT "TIFFShorts" (TIFFShort)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1083 |
<!-- A sequence of TIFFShort nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1084 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1085 |
<!ELEMENT "TIFFShort" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1086 |
<!-- An integral value between 0 and 65535 --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1087 |
<!ATTLIST "TIFFShort" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1088 |
<!-- The value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1089 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1090 |
<!ATTLIST "TIFFShort" "description" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1091 |
<!-- A description, if available --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1092 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1093 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1094 |
<!ELEMENT "TIFFSShorts" (TIFFSShort)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1095 |
<!-- A sequence of TIFFSShort nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1096 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1097 |
<!ELEMENT "TIFFSShort" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1098 |
<!-- An integral value between -32768 and 32767 --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1099 |
<!ATTLIST "TIFFSShort" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1100 |
<!-- The value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1101 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1102 |
<!ATTLIST "TIFFSShort" "description" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1103 |
<!-- A description, if available --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1104 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1105 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1106 |
<!ELEMENT "TIFFLongs" (TIFFLong)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1107 |
<!-- A sequence of TIFFLong nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1108 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1109 |
<!ELEMENT "TIFFLong" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1110 |
<!-- An integral value between 0 and 4294967295 --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1111 |
<!ATTLIST "TIFFLong" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1112 |
<!-- The value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1113 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1114 |
<!ATTLIST "TIFFLong" "description" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1115 |
<!-- A description, if available --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1116 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1117 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1118 |
<!ELEMENT "TIFFSLongs" (TIFFSLong)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1119 |
<!-- A sequence of TIFFSLong nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1120 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1121 |
<!ELEMENT "TIFFSLong" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1122 |
<!-- An integral value between -2147483648 and 2147482647 --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1123 |
<!ATTLIST "TIFFSLong" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1124 |
<!-- The value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1125 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1126 |
<!ATTLIST "TIFFSLong" "description" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1127 |
<!-- A description, if available --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1128 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1129 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1130 |
<!ELEMENT "TIFFRationals" (TIFFRational)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1131 |
<!-- A sequence of TIFFRational nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1132 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1133 |
<!ELEMENT "TIFFRational" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1134 |
<!-- A rational value consisting of an unsigned numerator and |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1135 |
denominator --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1136 |
<!ATTLIST "TIFFRational" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1137 |
<!-- The numerator and denominator, separated by a slash --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1138 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1139 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1140 |
<!ELEMENT "TIFFSRationals" (TIFFSRational)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1141 |
<!-- A sequence of TIFFSRational nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1142 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1143 |
<!ELEMENT "TIFFSRational" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1144 |
<!-- A rational value consisting of a signed numerator and |
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1145 |
denominator --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1146 |
<!ATTLIST "TIFFSRational" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1147 |
<!-- The numerator and denominator, separated by a slash --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1148 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1149 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1150 |
<!ELEMENT "TIFFFloats" (TIFFFloat)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1151 |
<!-- A sequence of TIFFFloat nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1152 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1153 |
<!ELEMENT "TIFFFloat" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1154 |
<!-- A single-precision floating-point value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1155 |
<!ATTLIST "TIFFFloat" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1156 |
<!-- The value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1157 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1158 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1159 |
<!ELEMENT "TIFFDoubles" (TIFFDouble)*> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1160 |
<!-- A sequence of TIFFDouble nodes --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1161 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1162 |
<!ELEMENT "TIFFDouble" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1163 |
<!-- A double-precision floating-point value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1164 |
<!ATTLIST "TIFFDouble" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1165 |
<!-- The value --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1166 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1167 |
|
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1168 |
<!ELEMENT "TIFFUndefined" EMPTY> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1169 |
<!-- Uninterpreted byte data --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1170 |
<!ATTLIST "TIFFUndefined" "value" #CDATA #IMPLIED> |
48264
efda6932a433
8182410: missing 'title' in api/javax/swing/plaf/synth/doc-files/componentProperties.html
serb
parents:
47716
diff
changeset
|
1171 |
<!-- A list of comma-separated byte values --> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1172 |
<!-- Data type: String --> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1173 |
]> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1174 |
</pre> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1175 |
|
35302
e4d2275861c3
8136494: Update "@since 1.9" to "@since 9" to match java.version.specification
iris
parents:
34416
diff
changeset
|
1176 |
@since 9 |
50358 | 1177 |
</main> |
34416
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1178 |
</body> |
68c0d866db5d
8143342: Integrate Java Image I/O support for TIFF per JEP 262
bpb
parents:
diff
changeset
|
1179 |
</html> |