/*
* 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.
*/
/*
* The source for this class was copied verbatim from the source for
* package com.sun.imageio.plugins.gif.GIFImageMetadata and then modified
* to make the class read-write capable.
*/
// package scope
static final String
public GIFWritableStreamMetadata() {
super(true,
"com.sun.imageio.plugins.gif.GIFStreamMetadataFormat", // XXX J2SE
// initialize metadata fields by default values
reset();
}
public boolean isReadOnly() {
return false;
}
throws IIOInvalidTreeException {
throw new IllegalArgumentException("root == null!");
}
} else if (formatName.equals
throw new IllegalArgumentException("root == null!");
}
} else {
throw new IllegalArgumentException("Not a recognized format!");
}
}
public void reset() {
pixelAspectRatio = 0;
backgroundColorIndex = 0;
sortFlag = false;
}
}
true, versionStrings);
/* NB: At the moment we use empty strings to support undefined
* integer values in tree representation.
* later.
*/
"logicalScreenWidth",
true,
true, 1, 65535);
"logicalScreenHeight",
true,
true, 1, 65535);
"colorResolution",
true,
true, 1, 8);
"pixelAspectRatio",
0, true,
true, 0, 255);
int sizeOfGlobalColorTable =
true, 2, 256);
if (sizeOfGlobalColorTable != 2 &&
sizeOfGlobalColorTable != 4 &&
sizeOfGlobalColorTable != 8 &&
sizeOfGlobalColorTable != 16 &&
sizeOfGlobalColorTable != 32 &&
sizeOfGlobalColorTable != 64 &&
sizeOfGlobalColorTable != 128 &&
sizeOfGlobalColorTable != 256) {
"Bad value for GlobalColorTable attribute sizeOfGlobalColorTable!");
}
"backgroundColorIndex",
0, true,
true, 0, 255);
true, sizeOfGlobalColorTable);
} else {
}
}
}
throws IIOInvalidTreeException {
if (!node.getNodeName()
}
"PaletteEntry",
false, -1);
"value",
-1, true,
true, 0, 255);
}
}
"value",
-1, true,
true, 1, 8);
break;
}
}
"value");
if (aspectRatio == 1.0F) {
pixelAspectRatio = 0;
} else {
}
"value",
-1, true,
true, 1, 65535);
"value",
-1, true,
true, 1, 65535);
}
}
true, null);
break;
}
}
break;
}
}
}
}
}
throws IIOInvalidTreeException
{
reset();
}
}