Package javax.imageio

Examples of javax.imageio.ImageWriter.dispose()


          .getDefault());
      iwparam.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
      iwparam.setCompressionQuality(0.7F);
      writer.write(null, new IIOImage(image, null, null), iwparam);
      ios.flush();
      writer.dispose();
      ios.close();
    } catch (IOException e) {
      e.printStackTrace();
    }
  }
View Full Code Here


        ImageOutputStream ios = javax.imageio.ImageIO.createImageOutputStream(os);
        writer.setOutput(ios);

        writer.write(new IIOImage(image, null, null));
        ios.flush();
        writer.dispose();
    } // saveImage

}
View Full Code Here

                }
                finally
                {
                    if( imageWriter != null )
                    {
                        imageWriter.dispose();
                    }
                }
            }
            if( !foundWriter )
            {
View Full Code Here

            iwparam.setCompressionQuality(compressionQuality);
               
            // Write the image
            writer.write(null, new IIOImage(bi, null, null), iwparam);
               
            writer.dispose();
           
            COSDictionary dic = getCOSStream();
            dic.setItem( COSName.FILTER, COSName.DCT_DECODE );
            dic.setItem( COSName.SUBTYPE, COSName.IMAGE);
            dic.setItem( COSName.TYPE, COSName.XOBJECT );
View Full Code Here

        ImageOutputStream ios = javax.imageio.ImageIO.createImageOutputStream(os);
        writer.setOutput(ios);

        writer.write(new IIOImage(image, null, null));
        ios.flush();
        writer.dispose();
    } // saveImage

}
View Full Code Here

        // now write the image
        writer.setOutput(stream);
        writer.write(null, new IIOImage(im, null, null), param);
        stream.flush();
        writer.dispose();
        stream.close();
    }

    /**
     * Lower the current thread priority in order not to block other threads while image operations are performed.<p>
View Full Code Here

        // now write the image
        writer.setOutput(stream);
        writer.write(null, new IIOImage(im, null, null), param);
        stream.flush();
        writer.dispose();
        stream.close();
    }

    private void threadSetNice() {
View Full Code Here

        ImageOutputStream ios = javax.imageio.ImageIO.createImageOutputStream(os);
        imageWriter.setOutput(ios);

        imageWriter.write(new IIOImage(bufferedImage, null, null));
        ios.flush();
        imageWriter.dispose();
    }
   
  /**
   * Adapter method used to convert any type of Source to a String
   *
 
View Full Code Here

            }
            ImageOutputStream ios = javax.imageio.ImageIO.createImageOutputStream(baos);
            imageWriter.setOutput(ios);
            imageWriter.write(new IIOImage(bufferedImage, null, null));
            ios.flush();
            imageWriter.dispose();
            return baos.toByteArray();
        } catch (IOException e) {
            throw ExceptionFactory.makeWebServiceException(e);
        }
View Full Code Here

        writer.setOutput(new MemoryCacheImageOutputStream(buffer));

        IIOImage ioImage = new IIOImage(bufferedImage, null, null);

        writer.write(null, ioImage, writeParam);
        writer.dispose();

        return buffer.getDirectByteArray();
    }

    private DefineBitsTag buildImage(byte[] imageBytes, byte[] alphaBytes)
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.