comparison src/java.desktop/share/classes/javax/imageio/metadata/doc-files/tiff_metadata.html @ 16334:96d44ff3c70f

8154058: [TIFF] ignoreMetadata parameter of TIFFImageReader's setInput() method affects TIFFImageReadParam in non-obvious way Summary: Add readUnknownTags to TIFFImageReadParam and add ReadParamTest Reviewed-by: prr
author bpb
date Tue, 13 Dec 2016 12:02:37 -0800
parents df43cdd4bb33
children
comparison
equal deleted inserted replaced
2:206b41351b8a 3:8da866da5eb7
214 more than one type, the first one will be based on the ICC profile and the 214 more than one type, the first one will be based on the ICC profile and the
215 second on the inferred color space.</p> 215 second on the inferred color space.</p>
216 216
217 <h4><a name="MetadataIssuesRead"/>Metadata Issues</h4> 217 <h4><a name="MetadataIssuesRead"/>Metadata Issues</h4>
218 218
219 By default all fields in the TIFF image file directory (IFD) are loaded into 219 By default all recognized fields in the TIFF image file directory (IFD) are
220 the native image metadata object. In cases where the IFD includes fields which 220 loaded into the native image metadata object. Which fields are loaded may be
221 contain large amounts of data this could be very inefficient. Which fields 221 controlled by setting which TIFF tags the reader is allowed to recognize,
222 are loaded may be controlled by setting which TIFF tags the reader is allowed 222 whether to read fields with unrecognized tags, and whether to ignore all
223 to recognize and whether it is ignoring metadata. The reader is informed to 223 metadata. The reader is informed to disregard all metadata as usual via the
224 disregard metadata as usual via the <code>ignoreMetadata</code> parameter of 224 <code>ignoreMetadata</code> parameter of
225 <code>ImageReader.setInput(Object,boolean,boolean)</code>. It is 225 <code>ImageReader.setInput(Object,boolean,boolean)</code>. It is
226 informed of which <a href="../../plugins/tiff/TIFFTag.html">TIFFTag</a>s to 226 informed of which <a href="../../plugins/tiff/TIFFTag.html">TIFFTag</a>s to
227 recognize or not to recognize via 227 recognize or not to recognize via
228 <code>TIFFImageReadParam.addAllowedTagSet(TIFFTagSet)</code> 228 <code>TIFFImageReadParam.addAllowedTagSet(TIFFTagSet)</code> and
229 and
230 <code>TIFFImageReadParam.removeAllowedTagSet(TIFFTagSet)</code>. 229 <code>TIFFImageReadParam.removeAllowedTagSet(TIFFTagSet)</code>.
231 If <code>ignoreMetadata</code> is <code>true</code>, then the reader will 230 If <code>ignoreMetadata</code> is <code>true</code>, then only metadata
232 load into the native image metadata object only those fields which have a 231 essential to reading the image will be loaded into the native image metadata
233 <code>TIFFTag</code> contained in the one of the allowed 232 object. If <code>ignoreMetadata</code> is <code>false</code>, then the reader
234 <code>TIFFTagSet</code>s. 233 will by default load into the native image metadata object only those fields
234 which are either essential to reading the image or have a <code>TIFFTag</code>
235 contained in the one of the allowed <code>TIFFTagSet</code>s. Reading of
236 fields with tags not in the allowed <code>TIFFTagSet</code>s may be forced
237 by passing in a <code>TIFFImageReadParam</code> on which
238 <code>TIFFImageReadParam.setReadUnknownTags(boolean)</code> has been
239 invoked with parameter <code>true</code>.
235 240
236 <p>Use of a <a href="../../plugins/tiff/TIFFDirectory.html">TIFFDirectory</a> 241 <p>Use of a <a href="../../plugins/tiff/TIFFDirectory.html">TIFFDirectory</a>
237 object may simplify gaining access to metadata values. An instance of 242 object may simplify gaining access to metadata values. An instance of
238 <code>TIFFDirectory</code> may be created from the <code>IIOMetadata</code> 243 <code>TIFFDirectory</code> may be created from the <code>IIOMetadata</code>
239 object returned by the TIFF reader using the 244 object returned by the TIFF reader using the