Search in sources :

Example 26 with IIOMetadataNode

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));
}
Also used : IIOMetadataNode(javax.imageio.metadata.IIOMetadataNode)

Example 27 with IIOMetadataNode

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;
}
Also used : IIOMetadataNode(javax.imageio.metadata.IIOMetadataNode)

Example 28 with IIOMetadataNode

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;
}
Also used : ListIterator(java.util.ListIterator) Iterator(java.util.Iterator) IIOMetadataNode(javax.imageio.metadata.IIOMetadataNode)

Example 29 with IIOMetadataNode

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;
}
Also used : Iterator(java.util.Iterator) IIOMetadataNode(javax.imageio.metadata.IIOMetadataNode)

Example 30 with IIOMetadataNode

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;
}
Also used : IIOMetadataNode(javax.imageio.metadata.IIOMetadataNode)

Aggregations

IIOMetadataNode (javax.imageio.metadata.IIOMetadataNode)65 Iterator (java.util.Iterator)5 IIOImage (javax.imageio.IIOImage)4 IIOMetadata (javax.imageio.metadata.IIOMetadata)4 Node (org.w3c.dom.Node)4 BufferedImage (java.awt.image.BufferedImage)3 ListIterator (java.util.ListIterator)3 ImageTypeSpecifier (javax.imageio.ImageTypeSpecifier)3 ImageWriter (javax.imageio.ImageWriter)3 ImageOutputStream (javax.imageio.stream.ImageOutputStream)3 Attr (org.w3c.dom.Attr)3 Graphics (java.awt.Graphics)2 Point (java.awt.Point)2 IndexColorModel (java.awt.image.IndexColorModel)2 ImageReader (javax.imageio.ImageReader)2 Element (org.w3c.dom.Element)2 ProductFlavorContainer (com.android.builder.model.ProductFlavorContainer)1 AndroidModel (com.android.tools.idea.model.AndroidModel)1 ChatPanel (com.glitchcog.fontificator.gui.chat.ChatPanel)1 Module (com.intellij.openapi.module.Module)1