Path: blob/master/src/java.desktop/share/classes/javax/imageio/metadata/package-info.java
41153 views
/*1* Copyright (c) 2000, 2017, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425/**26* A package of the Java Image I/O API dealing with reading and writing27* metadata.28* <p>29* When reading an image, its per-stream and per-image metadata is made30* available as an {@code IIOMetadata} object. The internals of this object are31* specific to the plug-in that created it. Its contents may be accessed in the32* form of an XML {@code Document}, which is implemented as a tree of33* {@code IIOMetadataNode} objects.34* <p>35* When writing an image, its metadata may be set by defining or modifying an36* {@code IIOMetadata} object. Such an object may be obtained from an37* {@code ImageWriter} or {@code ImageTranscoder} (from the38* {@code javax.imageio} package). Once such an object has been obtained, its39* contents may be set of modified via a {@code Document} consisting of40* {@code IIOMetadataNode}s. The document format may optionally be described41* using an {@code IIOMetadataFormat} object.42* <p>43* The format of the metadata contained in the XML {@code Document} is44* identified by a string which appears as the root node of the tree of45* {@code IIOMetadataNode} objects. This string contains a version number, e.g.46* "javax_imageio_jpeg_image_1.0". Readers and writers may support multiple47* versions of the same basic format and the Image I/O API has methods that48* allow specifying which version to use by passing the string to the49* method/constructor used to obtain an {@code IIOMetadata} object. In some50* cases, a more recent version may not be strictly compatible with a program51* written expecting an older version (for an example, see the Native Metadata52* Format section of the JPEG Metadata Usage Notes below).53* <p>54* Plug-ins may choose to support a55* <A HREF="doc-files/standard_metadata.html">standard (plug-in neutral) format56* </A>. This format does not provide lossless encoding of metadata, but allows57* a portion of the metadata to be accessed in a generic manner.58* <p>59* Each of the standard plug-ins supports a so-called "native" metadata format,60* which encodes its metadata losslessly:61* <ul>62* <li><A HREF="doc-files/bmp_metadata.html">BMP metadata</A></li>63* <li><A HREF="doc-files/gif_metadata.html">GIF metadata</A></li>64* <li><A HREF="doc-files/jpeg_metadata.html">JPEG metadata</A></li>65* <li><A HREF="doc-files/png_metadata.html">PNG metadata</A></li>66* <li><A HREF="doc-files/tiff_metadata.html#StreamMetadata">67* TIFF metadata</A></li>68* <li><A HREF="doc-files/wbmp_metadata.html">WBMP metadata</A></li>69* </ul>70* @since 1.471*/72package javax.imageio.metadata;737475