use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class BMPMetadata method addXYZPoints.
private void addXYZPoints(IIOMetadataNode root, String name, double x, double y, double z) {
IIOMetadataNode node = addChildNode(root, name, null);
addChildNode(node, "X", new Double(x));
addChildNode(node, "Y", new Double(y));
addChildNode(node, "Z", new Double(z));
}
use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class AdobeMarkerSegment method getNativeNode.
IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode("app14Adobe");
node.setAttribute("version", Integer.toString(version));
node.setAttribute("flags0", Integer.toString(flags0));
node.setAttribute("flags1", Integer.toString(flags1));
node.setAttribute("transform", Integer.toString(transform));
return node;
}
use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class JPEGMetadata method getStandardTextNode.
protected IIOMetadataNode getStandardTextNode() {
IIOMetadataNode text = null;
// Add a text entry for each COM Marker Segment
if (findMarkerSegment(JPEG.COM) != null) {
text = new IIOMetadataNode("Text");
Iterator iter = markerSequence.iterator();
while (iter.hasNext()) {
MarkerSegment seg = (MarkerSegment) iter.next();
if (seg.tag == JPEG.COM) {
COMMarkerSegment com = (COMMarkerSegment) seg;
IIOMetadataNode entry = new IIOMetadataNode("TextEntry");
entry.setAttribute("keyword", "comment");
entry.setAttribute("value", com.getComment());
text.appendChild(entry);
}
}
}
return text;
}
use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class JFIFMarkerSegment method getNativeNode.
/**
* Returns a tree of DOM nodes representing this object and any
* subordinate JFXX extension or ICC Profile segments.
*/
IIOMetadataNode getNativeNode() {
IIOMetadataNode node = new IIOMetadataNode("app0JFIF");
node.setAttribute("majorVersion", Integer.toString(majorVersion));
node.setAttribute("minorVersion", Integer.toString(minorVersion));
node.setAttribute("resUnits", Integer.toString(resUnits));
node.setAttribute("Xdensity", Integer.toString(Xdensity));
node.setAttribute("Ydensity", Integer.toString(Ydensity));
node.setAttribute("thumbWidth", Integer.toString(thumbWidth));
node.setAttribute("thumbHeight", Integer.toString(thumbHeight));
if (!extSegments.isEmpty()) {
IIOMetadataNode JFXXnode = new IIOMetadataNode("JFXX");
node.appendChild(JFXXnode);
for (Iterator iter = extSegments.iterator(); iter.hasNext(); ) {
JFIFExtensionMarkerSegment seg = (JFIFExtensionMarkerSegment) iter.next();
JFXXnode.appendChild(seg.getNativeNode());
}
}
if (iccSegment != null) {
node.appendChild(iccSegment.getNativeNode());
}
return node;
}
use of javax.imageio.metadata.IIOMetadataNode in project jdk8u_jdk by JetBrains.
the class WBMPMetadata method getStandardDimensionNode.
protected IIOMetadataNode getStandardDimensionNode() {
IIOMetadataNode dimension_node = new IIOMetadataNode("Dimension");
// scratch node
IIOMetadataNode node = null;
// PixelAspectRatio not in image
node = new IIOMetadataNode("ImageOrientation");
node.setAttribute("value", "Normal");
dimension_node.appendChild(node);
return dimension_node;
}
Aggregations