return "";
}
}
private Node getNativeTree() {
IIOMetadataNode root =
new IIOMetadataNode(nativeMetadataFormatName);
addChildNode(root, "BMPVersion", bmpVersion);
addChildNode(root, "Width", new Integer(width));
addChildNode(root, "Height", new Integer(height));
addChildNode(root, "BitsPerPixel", new Short(bitsPerPixel));
addChildNode(root, "Compression", new Integer(compression));
addChildNode(root, "ImageSize", new Integer(imageSize));
IIOMetadataNode node = addChildNode(root, "PixelsPerMeter", null);
addChildNode(node, "X", new Integer(xPixelsPerMeter));
addChildNode(node, "Y", new Integer(yPixelsPerMeter));
addChildNode(root, "ColorsUsed", new Integer(colorsUsed));
addChildNode(root, "ColorsImportant", new Integer(colorsImportant));
int version = 0;
for (int i = 0; i < bmpVersion.length(); i++)
if (Character.isDigit(bmpVersion.charAt(i)))
version = bmpVersion.charAt(i) -'0';
if (version >= 4) {
node = addChildNode(root, "Mask", null);
addChildNode(node, "Red", new Integer(redMask));
addChildNode(node, "Green", new Integer(greenMask));
addChildNode(node, "Blue", new Integer(blueMask));
addChildNode(node, "Alpha", new Integer(alphaMask));
addChildNode(root, "ColorSpaceType", new Integer(colorSpace));
node = addChildNode(root, "CIEXYZEndPoints", null);
addXYZPoints(node, "Red", redX, redY, redZ);
addXYZPoints(node, "Green", greenX, greenY, greenZ);
addXYZPoints(node, "Blue", blueX, blueY, blueZ);
node = addChildNode(root, "Intent", new Integer(intent));
}
// Palette
if ((palette != null) && (paletteSize > 0)) {
node = addChildNode(root, "Palette", null);
int numComps = palette.length / paletteSize;
for (int i = 0, j = 0; i < paletteSize; i++) {
IIOMetadataNode entry =
addChildNode(node, "PaletteEntry", null);
red = palette[j++] & 0xff;
green = palette[j++] & 0xff;
blue = palette[j++] & 0xff;
addChildNode(entry, "Red", new Byte((byte)red));