/*
* 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.
*/
private PNGMetadataFormat() {
// root -> IHDR
DATATYPE_INTEGER, true, null,
VALUE_1, VALUE_MAX_32, true, true);
DATATYPE_INTEGER, true, null,
VALUE_1, VALUE_MAX_32, true, true);
DATATYPE_INTEGER, true, null,
String[] colorTypes = {
"Grayscale", "RGB", "Palette", "GrayAlpha", "RGBAlpha"
};
DATATYPE_STRING, true, null,
DATATYPE_STRING, true, null,
DATATYPE_STRING, true, null,
DATATYPE_STRING, true, null,
// root -> PLTE
1, 256);
// root -> PLTE -> PLTEEntry
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
// root -> bKGD
// root -> bKGD -> bKGD_Grayscale
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
// root -> bKGD -> bKGD_RGB
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
// root -> bKGD -> bKGD_Palette
DATATYPE_INTEGER, true, null,
// root -> cHRM
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
// root -> gAMA
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_32, true, true);
// root -> hIST
1, 256);
// root -> hISTEntry
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
// root -> iCCP
DATATYPE_STRING, true, null);
DATATYPE_STRING, true, null,
// root -> iTXt
// root -> iTXt -> iTXtEntry
DATATYPE_STRING, true, null);
false, false);
DATATYPE_STRING, true, null);
DATATYPE_STRING, true, null);
DATATYPE_STRING, true, null);
DATATYPE_STRING, true, null);
// root -> pHYS
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_32, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_32, true, true);
DATATYPE_STRING, true, null,
// root -> sBIT
// root -> sBIT -> sBIT_Grayscale
DATATYPE_INTEGER, true, null,
// root -> sBIT -> sBIT_GrayAlpha
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
// root -> sBIT -> sBIT_RGB
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
// root -> sBIT -> sBIT_RGBAlpha
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
// root -> sBIT -> sBIT_Palette
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
// root -> sPLT
1, 256);
// root -> sPLT -> sPLTEntry
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
// root -> sRGB
DATATYPE_STRING, true, null,
// root -> tEXt
// root -> tEXt -> tEXtEntry
DATATYPE_STRING, true, null);
DATATYPE_STRING, true, null);
// root -> tIME
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
// root -> tRNS
// root -> tRNS -> tRNS_Grayscale
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
// root -> tRNS -> tRNS_RGB
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
DATATYPE_INTEGER, true, null,
VALUE_0, VALUE_MAX_16, true, true);
// root -> tRNS -> tRNS_Palette
DATATYPE_INTEGER, true, null,
DATATYPE_INTEGER, true, null,
// root -> zTXt
// root -> zTXt -> zTXtEntry
DATATYPE_STRING, true, null);
DATATYPE_STRING, true, null,
DATATYPE_STRING, true, null);
// root -> UnknownChunks
// root -> UnknownChunks -> UnknownChunk
DATATYPE_STRING, true, null);
}
return true;
}
instance = new PNGMetadataFormat();
}
return instance;
}
}