use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class GIFImageMetadata method getStandardDataNode.
public IIOMetadataNode getStandardDataNode() {
IIOMetadataNode data_node = new IIOMetadataNode("Data");
// scratch node
IIOMetadataNode node = null;
// PlanarConfiguration not in format
node = new IIOMetadataNode("SampleFormat");
node.setAttribute("value", "Index");
data_node.appendChild(node);
return data_node;
}
use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class GIFStreamMetadata method getStandardDocumentNode.
public IIOMetadataNode getStandardDocumentNode() {
IIOMetadataNode document_node = new IIOMetadataNode("Document");
// scratch node
IIOMetadataNode node = null;
node = new IIOMetadataNode("FormatVersion");
node.setAttribute("value", version);
document_node.appendChild(node);
return document_node;
}
use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class GIFStreamMetadata method getStandardDimensionNode.
public IIOMetadataNode getStandardDimensionNode() {
IIOMetadataNode dimension_node = new IIOMetadataNode("Dimension");
// scratch node
IIOMetadataNode node = null;
node = new IIOMetadataNode("PixelAspectRatio");
float aspectRatio = 1.0F;
if (pixelAspectRatio != 0) {
aspectRatio = (pixelAspectRatio + 15) / 64.0F;
}
node.setAttribute("value", Float.toString(aspectRatio));
dimension_node.appendChild(node);
node = new IIOMetadataNode("ImageOrientation");
node.setAttribute("value", "Normal");
dimension_node.appendChild(node);
// HorizontalPixelSize not in format
// VerticalPixelSize not in format
// HorizontalPhysicalPixelSpacing not in format
// VerticalPhysicalPixelSpacing not in format
// HorizontalPosition not in format
// VerticalPosition not in format
// HorizontalPixelOffset not in stream
// VerticalPixelOffset not in stream
node = new IIOMetadataNode("HorizontalScreenSize");
node.setAttribute("value", logicalScreenWidth == UNDEFINED_INTEGER_VALUE ? "" : Integer.toString(logicalScreenWidth));
dimension_node.appendChild(node);
node = new IIOMetadataNode("VerticalScreenSize");
node.setAttribute("value", logicalScreenHeight == UNDEFINED_INTEGER_VALUE ? "" : Integer.toString(logicalScreenHeight));
dimension_node.appendChild(node);
return dimension_node;
}
use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class GIFImageMetadata method getStandardCompressionNode.
public IIOMetadataNode getStandardCompressionNode() {
IIOMetadataNode compression_node = new IIOMetadataNode("Compression");
// scratch node
IIOMetadataNode node = null;
node = new IIOMetadataNode("CompressionTypeName");
node.setAttribute("value", "lzw");
compression_node.appendChild(node);
node = new IIOMetadataNode("Lossless");
node.setAttribute("value", "TRUE");
compression_node.appendChild(node);
node = new IIOMetadataNode("NumProgressiveScans");
node.setAttribute("value", interlaceFlag ? "4" : "1");
compression_node.appendChild(node);
return compression_node;
}
use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class WBMPMetadata method addChildNode.
private IIOMetadataNode addChildNode(IIOMetadataNode root, String name, Object object) {
IIOMetadataNode child = new IIOMetadataNode(name);
if (object != null) {
child.setUserObject(object);
child.setNodeValue(ImageUtil.convertObjectToString(object));
}
root.appendChild(child);
return child;
}
Aggregations