Search in sources :

Example 76 with IIOMetadataNode

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

Example 77 with IIOMetadataNode

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

Example 78 with IIOMetadataNode

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

Example 79 with IIOMetadataNode

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

Example 80 with IIOMetadataNode

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

Aggregations

IIOMetadataNode (javax.imageio.metadata.IIOMetadataNode)132 Node (org.w3c.dom.Node)20 IIOMetadata (javax.imageio.metadata.IIOMetadata)12 NodeList (org.w3c.dom.NodeList)12 TIFFField (it.geosolutions.imageio.plugins.tiff.TIFFField)10 Iterator (java.util.Iterator)9 BufferedImage (java.awt.image.BufferedImage)8 ArrayList (java.util.ArrayList)8 ASOCBoxMetadataNode (it.geosolutions.imageio.plugins.jp2k.box.ASOCBoxMetadataNode)5 UUIDBoxMetadataNode (it.geosolutions.imageio.plugins.jp2k.box.UUIDBoxMetadataNode)5 XMLBoxMetadataNode (it.geosolutions.imageio.plugins.jp2k.box.XMLBoxMetadataNode)5 IOException (java.io.IOException)5 ImageOutputStream (javax.imageio.stream.ImageOutputStream)5 File (java.io.File)4 IIOImage (javax.imageio.IIOImage)4 ImageTypeSpecifier (javax.imageio.ImageTypeSpecifier)4 ImageWriter (javax.imageio.ImageWriter)4 TIFFTag (it.geosolutions.imageio.plugins.tiff.TIFFTag)3 Color (java.awt.Color)3 Point (java.awt.Point)3