Examples of prepareWriteSequence()


Examples of com.sun.media.imageioimpl.plugins.gif.GIFImageWriter.prepareWriteSequence()

        ImageOutputStream otStream = null;
        List<RenderedImage> images = new ArrayList<RenderedImage>();
        try {
            otStream = ImageIO.createImageOutputStream(outStream);
            gifWriter.setOutput(otStream);
            gifWriter.prepareWriteSequence(null);

            // gif params
            final GetMapRequest request = (GetMapRequest) mapContent.getRequest();
            final Boolean loopContinuosly = (request.getFormatOptions().get("gif_loop_continuosly") != null ?
                    Boolean.valueOf((String)request.getFormatOptions().get("gif_loop_continuosly")) : wms.getLoopContinuously());
View Full Code Here

Examples of javax.imageio.ImageWriter.prepareWriteSequence()

            netscapeExtension.setUserObject(new byte[] { 0x1, numLoops, 0x0 });
            applicationExtensionsNode.appendChild(netscapeExtension);
            imageMetaData.setFromTree(metaFormatName, root);

            imageWriter.prepareWriteSequence(null);

            userResource.startFramesSequence();

            while (userResource.hasNextFrame()) {
                Graphics2D g2d = null;
View Full Code Here

Examples of javax.imageio.ImageWriter.prepareWriteSequence()

            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];
                if (IndexImageBuilder.needConvertToIndex(renderedImg)) {
View Full Code Here

Examples of javax.imageio.ImageWriter.prepareWriteSequence()

      ImageWriteParam iwp = writer.getDefaultWriteParam();
      ((TIFFImageWriteParam)iwp).setPhotometricInterpretation("YCbCr");
      iwp.setCompressionType("jpeg");
      iwp.setCompressionQuality(0.9f);

      writer.prepareWriteSequence(null);

      writer.writeToSequence(new IIOImage(image,null,null),iwp);

      writer.endWriteSequence();
      ios.close();     
View Full Code Here

Examples of javax.imageio.ImageWriter.prepareWriteSequence()

      System.out.println("Output 2: "+file.getAbsolutePath())

      ios = ImageIO.createImageOutputStream(file);
      writer.setOutput(ios);

      writer.prepareWriteSequence(null);

      writer.writeToSequence(new IIOImage(readimage,null,null),iwp);
      writer.writeToSequence(new IIOImage(image,null,null),iwp);

      writer.endWriteSequence();
View Full Code Here

Examples of javax.imageio.ImageWriter.prepareWriteSequence()

            ios = new MemoryCacheImageOutputStream(os);
            metaData.setFromTree(metaFormatName, root);

            writer.setOutput(ios);
           
            writer.prepareWriteSequence(null);

            for (int i = 0; i < animation.getNumFrames(); ++i) {
                writer.writeToSequence(new IIOImage(animation.getFrame(i), null, metaData), param);
            }
            writer.endWriteSequence();
View Full Code Here

Examples of javax.imageio.ImageWriter.prepareWriteSequence()

        ImageWriter writer = ImageIO.getImageWritersByFormatName("GIF").next();
        ImageOutputStream ios = ImageIO.createImageOutputStream(new File("lut_test.gif"));
        ImageWriteParam param = writer.getDefaultWriteParam();
        writer.setOutput(ios);
        writer.prepareWriteSequence(null);
        writer.writeToSequence(new IIOImage(frame1, null, null), param);
        writer.writeToSequence(new IIOImage(frame2, null, null), param);
        writer.endWriteSequence();
        writer.reset();
        writer.dispose();
View Full Code Here

Examples of uk.co.mmscomputing.imageio.pdf.PDFImageWriter.prepareWriteSequence()

   * PDF Writer
   */
  public static void writePdf(List<BufferedImage> images, ImageOutputStream ios) throws IOException {
    PDFImageWriter writer = (PDFImageWriter) ImageIO.getImageWritersByFormatName("pdf").next();
    writer.setOutput(ios);
    writer.prepareWriteSequence(null);
   
    for (int i=0; i < images.size(); i++) {
      writer.writeToSequence(images.get(i));
    }
   
View Full Code Here

Examples of uk.co.mmscomputing.imageio.tiff.TIFFImageWriter.prepareWriteSequence()

   * TIFF Writer
   */
  public static void writeTiff(List<BufferedImage> images, ImageOutputStream ios) throws IOException {
    TIFFImageWriter writer = (TIFFImageWriter) ImageIO.getImageWritersByFormatName("tif").next();
    writer.setOutput(ios);
    writer.prepareWriteSequence(null);
   
    for (int i=0; i < images.size(); i++) {
      writer.writeToSequence(images.get(i), null);
    }
   
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.