0N/A<!
DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
2362N/ACopyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved. 0N/ADO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 0N/AThis code is free software; you can redistribute it and/or modify it 0N/Aunder the terms of the GNU General Public License version 2 only, as 2362N/Apublished by the Free Software Foundation. Oracle designates this 0N/Aparticular file as subject to the "Classpath" exception as provided 2362N/Aby Oracle in the LICENSE file that accompanied this code. 0N/AThis code is distributed in the hope that it will be useful, but WITHOUT 0N/AANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 0N/AFITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 0N/Aversion 2 for more details (a copy is included in the LICENSE file that 0N/Aaccompanied this code). 0N/AYou should have received a copy of the GNU General Public License version 0N/A2 along with this work; if not, write to the Free Software Foundation, 0N/AInc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 2365N/APlease contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 0N/A<
body bgcolor="white">
0N/AA package of the Java Image I/O API dealing with reading and writing
0N/AWhen reading an image, its per-stream and per-image metadata is made
0N/Aavailable as an <
code>IIOMetadata</
code> object. The internals of
0N/Athis object are specific to the plug-in that created it. Its contents
0N/Amay be accessed in the form of an XML <
code>Document</
code>, which is
0N/Aimplemented as a tree of <
code>IIOMetadataNode</
code> objects.
0N/AWhen writing an image, its metadata may be set by defining or
0N/Amodifying an <
code>IIOMetadata</
code> object. Such an object may be
0N/Aobtained from an <
code>ImageWriter</
code> or
0N/A<
code>ImageTranscoder</
code> (from the
0N/Abeen obtained, its contents may be set of modified via a
0N/A<
code>Document</
code> consisting of <
code>IIOMetadataNode</
code>s.
0N/AThe document format may optionally be described using an
0N/A<
code>IIOMetadataFormat</
code> object.
0N/AThe format of the metadata contained in the XML <
code>Document</
code>
0N/Ais identified by a string which appears as the root node of the tree
0N/Aof <
code>IIOMetadataNode</
code> objects. This string contains a version
0N/Anumber,
e.g. "javax_imageio_jpeg_image_1.0". Readers and writers may
0N/Asupport multiple versions of the same basic format and the Image I/O
0N/AAPI has methods that allow specifying which version to use by passing
0N/Aobject. In some cases, a more recent version may not be strictly
0N/Acompatible with a program written expecting an older version (for
0N/Aan example, see the Native Metadata Format section of the JPEG Metadata
0N/APlug-ins may choose to support a <
A 0N/Aformat</
A>. This format does not provide lossless encoding of
0N/Ametadata, but allows a portion of the metadata to be accessed in a
0N/AEach of the standard plug-ins supports a so-called "native" metadata
0N/Aformat, which encodes its metadata losslessly: