Examples of mergeTree()


Examples of javax.imageio.metadata.IIOMetadata.mergeTree()

            writer.setOutput(imageOut);

            ImageWriteParam param = writer.getDefaultWriteParam();
            IIOMetadata streamMeta = writer.getDefaultStreamMetadata(param);
            //merge stream metadata
            streamMeta.mergeTree(ImageWrapper.GIF_STREAM_METADATA_NAME, imgWrapper.getStreamMetadata());
            writer.prepareWriteSequence(streamMeta);
            for (int i = 0; i < images.length; i++) {
                ImageTypeSpecifier imageType = new ImageTypeSpecifier(images[i].getColorModel(),
                                                                      images[i].getSampleModel());
                RenderedImage renderedImg = images[i];
View Full Code Here

Examples of javax.imageio.metadata.IIOMetadata.mergeTree()

                if (IndexImageBuilder.needConvertToIndex(renderedImg)) {
                    NodeUtils.removeChild(metadatas[i], "LocalColorTable");
                    renderedImg = IndexImageBuilder.createIndexedImage(renderedImg, quantAlg);
                }
                IIOMetadata meta = writer.getDefaultImageMetadata(imageType, param);
                meta.mergeTree(ImageWrapper.GIF_IMAGE_METADATA_NAME, metadatas[i]);

                IIOImage img = new IIOImage(renderedImg, null, meta);
                writer.writeToSequence(img, param);
            }
            writer.endWriteSequence();
View Full Code Here

Examples of javax.imageio.metadata.IIOMetadata.mergeTree()

        for (int i = 0; i < annotations.size(); i++) {
            textNode.appendChild(getAnnotationNode((Annotation) annotations.get(i), i));
        }
        root.appendChild(textNode);

        imageMetadata.mergeTree(imageMetadata.getNativeMetadataFormatName(), root);

        IIOImage imageWrite = new IIOImage(pngImage, new ArrayList<BufferedImage>(), imageMetadata);

        ImageWriter writer = getPNGImageWriter();
        ImageOutputStream ios = ImageIO.createImageOutputStream(new FileOutputStream(file));
View Full Code Here

Examples of javax.imageio.metadata.IIOMetadata.mergeTree()

        entry.setAttribute("compressionFlag", "true");
        entry.setAttribute("compressionMethod", "0");
        entry.setAttribute("languageTag", "x-circled");
        entry.setAttribute("translatedKeyword", COMPRESSED);
        entry.setAttribute("text", TEXT);
        meta.mergeTree(format, root);
        iw.write(new IIOImage(img, null, meta));
        iw.dispose();

        byte[] bytes = os.toByteArray();
        if (dump)
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.