/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 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 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
// package scope
static final String
"none",
"doNotDispose",
"restoreToBackgroundColor",
"restoreToPrevious",
"undefinedDisposalMethod4",
"undefinedDisposalMethod5",
"undefinedDisposalMethod6",
"undefinedDisposalMethod7"
};
// Fields from Image Descriptor
public int imageLeftPosition;
public int imageTopPosition;
public int imageWidth;
public int imageHeight;
public boolean interlaceFlag = false;
public boolean sortFlag = false;
// Fields from Graphic Control Extension
public boolean userInputFlag = false;
public boolean transparentColorFlag = false;
// Fields from Plain Text Extension
public boolean hasPlainTextExtension = false;
public int textGridLeft;
public int textGridTop;
public int textGridWidth;
public int textGridHeight;
public int characterCellWidth;
public int characterCellHeight;
public int textForegroundColor;
public int textBackgroundColor;
public byte[] text;
// Fields from ApplicationExtension
// List of byte[]
// List of byte[]
// List of byte[]
// Fields from CommentExtension
// List of byte[]
{
}
public GIFImageMetadata() {
this(true,
"com.sun.imageio.plugins.gif.GIFImageMetadataFormat",
}
public boolean isReadOnly() {
return true;
}
return getNativeTree();
} else if (formatName.equals
return getStandardTree();
} else {
throw new IllegalArgumentException("Not a recognized format!");
}
}
try {
} catch (UnsupportedEncodingException e) {
return "";
}
}
// Image descriptor
// Local color table
if (localColorTable != null) {
for (int i = 0; i < numEntries; i++) {
new IIOMetadataNode("ColorTableEntry");
}
}
// Graphic control extension
if (hasPlainTextExtension) {
}
// Application extensions
if (numAppExtensions > 0) {
for (int i = 0; i < numAppExtensions; i++) {
new IIOMetadataNode("ApplicationExtension");
}
}
// Comment extensions
if (numComments > 0) {
for (int i = 0; i < numComments; i++) {
new IIOMetadataNode("CommentExtension");
}
}
return root;
}
// Gamma not in format
if (localColorTable != null) {
for (int i = 0; i < numEntries; i++) {
new IIOMetadataNode("PaletteEntry");
}
}
// BackgroundIndex not in image
// BackgroundColor not in format
return chroma_node;
}
// BitRate not in format
return compression_node;
}
// PlanarConfiguration not in format
// BitsPerSample not in image
// SignificantBitsPerSample not in format
// SampleMSB not in format
return data_node;
}
// PixelAspectRatio not in image
// HorizontalPixelSize not in format
// VerticalPixelSize not in format
// HorizontalPhysicalPixelSpacing not in format
// VerticalPhysicalPixelSpacing not in format
// HorizontalPosition not in format
// VerticalPosition not in format
// HorizontalScreenSize not in image
// VerticalScreenSize not in image
return dimension_node;
}
// Document not in image
return null;
}
if (!commentIter.hasNext()) {
return null;
}
while (commentIter.hasNext()) {
try {
} catch (UnsupportedEncodingException e) {
throw new RuntimeException("Encoding ISO-8859-1 unknown!");
}
}
return text_node;
}
if (!transparentColorFlag) {
return null;
}
new IIOMetadataNode("Transparency");
// Alpha not in format
// TransparentColor not in format
// TileTransparencies not in format
// TileOpacities not in format
return transparency_node;
}
throws IIOInvalidTreeException
{
throw new IllegalStateException("Metadata is read-only!");
}
{
throw new IllegalStateException("Metadata is read-only!");
}
{
throw new IllegalStateException("Metadata is read-only!");
}
public void reset() {
throw new IllegalStateException("Metadata is read-only!");
}
}