114 lines · 3.6 KB · HTML
RawDownload
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN"><html><head><!--Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. This code is free software; you can redistribute it and/or modify itunder the terms of the GNU General Public License version 2 only, aspublished by the Free Software Foundation.  Oracle designates thisparticular file as subject to the "Classpath" exception as providedby Oracle in the LICENSE file that accompanied this code. This code is distributed in the hope that it will be useful, but WITHOUTANY WARRANTY; without even the implied warranty of MERCHANTABILITY orFITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public Licenseversion 2 for more details (a copy is included in the LICENSE file thataccompanied this code). You should have received a copy of the GNU General Public License version2 along with this work; if not, write to the Free Software Foundation,Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USAor visit www.oracle.com if you need additional information or have anyquestions.--> </head> <body bgcolor="white"> A package of the Java Image I/O API dealing with reading and writingmetadata. <p> When reading an image, its per-stream and per-image metadata is madeavailable as an <code>IIOMetadata</code> object.  The internals ofthis object are specific to the plug-in that created it.  Its contentsmay be accessed in the form of an XML <code>Document</code>, which isimplemented as a tree of <code>IIOMetadataNode</code> objects. <p> When writing an image, its metadata may be set by defining ormodifying an <code>IIOMetadata</code> object.  Such an object may beobtained from an <code>ImageWriter</code> or<code>ImageTranscoder</code> (from the<code>javax.imageio</code> package).  Once such an object hasbeen obtained, its contents may be set of modified via a<code>Document</code> consisting of <code>IIOMetadataNode</code>s.The document format may optionally be described using an<code>IIOMetadataFormat</code> object. <p> The format of the metadata contained in the XML <code>Document</code>is identified by a string which appears as the root node of the treeof <code>IIOMetadataNode</code> objects.  This string contains a versionnumber, e.g. "javax_imageio_jpeg_image_1.0".  Readers and writers maysupport multiple versions of the same basic format and the Image I/OAPI has methods that allow specifying which version to use by passingthe string to the method/constructor used to obtain an <code>IIOMetadata</code>object.  In some cases, a more recent version may not be strictlycompatible with a program written expecting an older version (foran example, see the Native Metadata Format section of the JPEG MetadataUsage Notes below). <p> Plug-ins may choose to support a <AHREF="doc-files/standard_metadata.html">standard (plug-in neutral)format</A>.  This format does not provide lossless encoding ofmetadata, but allows a portion of the metadata to be accessed in ageneric manner. <p> Each of the standard plug-ins supports a so-called "native" metadataformat, which encodes its metadata losslessly: <ul><li><A HREF="doc-files/gif_metadata.html">GIF metadata</A> <li><A HREF="doc-files/jpeg_metadata.html">JPEG metadata</A> <li><A HREF="doc-files/png_metadata.html">PNG metadata</A> <li><A HREF="doc-files/bmp_metadata.html">BMP metadata</A> <li><A HREF="doc-files/wbmp_metadata.html">WBMP metadata</A> </ul> @since 1.4 </body></html>