Package javax.imageio

Examples of javax.imageio.ImageWriter.endWriteSequence()


                        g2d.dispose();
                    }
                }
            }

            imageWriter.endWriteSequence();
        } finally {
            imageWriter.dispose();
        }
    }
}
View Full Code Here


                meta.mergeTree(ImageWrapper.GIF_IMAGE_METADATA_NAME, metadatas[i]);

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

            imageOut.flush();
        } catch (IOException e) {
            throw new SimpleImageException(e);
        } finally {
View Full Code Here

      writer.prepareWriteSequence(null);

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

      writer.endWriteSequence();
      ios.close();     

      BufferedImage readimage  = ImageIO.read(file);
      Graphics2D    g         = (Graphics2D)readimage.getGraphics();
      g.drawString("Hello World!",20,40);
View Full Code Here

      writer.prepareWriteSequence(null);

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

      writer.endWriteSequence();
      ios.close();     
    }catch(Exception e){
      e.printStackTrace();
    }   
  }
View Full Code Here

            writer.prepareWriteSequence(null);

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

        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();

        ios.flush();
        ios.close();
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.