KickJava   Java API By Example, From Geeks To Geeks.

Java > Java SE, EE, ME > javax > imageio > ImageWriter

javax.imageio
Class ImageWriter

java.lang.Object
  extended by javax.imageio.ImageWriter
All Implemented Interfaces:
ImageTranscoder
See Also:
Top Examples, Source Code, ImageReader, ImageWriteParam, IIORegistry, ImageWriterSpi

public void abort()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected boolean abortRequested()
See Also:
clearAbortRequest(), abort()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void addIIOWriteProgressListener(IIOWriteProgressListener listener)
See Also:
removeIIOWriteProgressListener(javax.imageio.event.IIOWriteProgressListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void addIIOWriteWarningListener(IIOWriteWarningListener listener)
See Also:
removeIIOWriteWarningListener(javax.imageio.event.IIOWriteWarningListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected Locale[] availableLocales
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canInsertEmpty(int imageIndex)
                       throws IOException
See Also:
IndexOutOfBoundsException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canInsertImage(int imageIndex)
                       throws IOException
See Also:
IndexOutOfBoundsException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canRemoveImage(int imageIndex)
                       throws IOException
See Also:
IndexOutOfBoundsException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canReplaceImageMetadata(int imageIndex)
                                throws IOException
See Also:
IndexOutOfBoundsException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canReplacePixels(int imageIndex)
                         throws IOException
See Also:
IndexOutOfBoundsException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canReplaceStreamMetadata()
                                 throws IOException
See Also:
IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canWriteEmpty()
                      throws IOException
See Also:
IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canWriteRasters()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public boolean canWriteSequence()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void clearAbortRequest()
See Also:
abortRequested(), abort()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract IIOMetadata convertImageMetadata(IIOMetadata inData,
                                                 ImageTypeSpecifier imageType,
                                                 ImageWriteParam param)
See Also:
ImageTranscoder
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract IIOMetadata convertStreamMetadata(IIOMetadata inData,
                                                  ImageWriteParam param)
See Also:
ImageTranscoder
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void dispose()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void endInsertEmpty()
                    throws IOException
See Also:
IllegalStateException, UnsupportedOperationException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void endReplacePixels()
                      throws IOException
See Also:
IllegalStateException, UnsupportedOperationException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void endWriteEmpty()
                   throws IOException
See Also:
IllegalStateException, UnsupportedOperationException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void endWriteSequence()
                      throws IOException
See Also:
UnsupportedOperationException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Locale[] getAvailableLocales()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType,
                                                    ImageWriteParam param)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract IIOMetadata getDefaultStreamMetadata(ImageWriteParam param)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ImageWriteParam getDefaultWriteParam()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Locale getLocale()
See Also:
setLocale(java.util.Locale)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public int getNumThumbnailsSupported(ImageTypeSpecifier imageType,
                                     ImageWriteParam param,
                                     IIOMetadata streamMetadata,
                                     IIOMetadata imageMetadata)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public ImageWriterSpi getOriginatingProvider()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Object getOutput()
See Also:
setOutput(java.lang.Object)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public Dimension[] getPreferredThumbnailSizes(ImageTypeSpecifier imageType,
                                              ImageWriteParam param,
                                              IIOMetadata streamMetadata,
                                              IIOMetadata imageMetadata)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected ImageWriter(ImageWriterSpi originatingProvider)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected Locale locale
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected ImageWriterSpi originatingProvider
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected Object output
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void prepareInsertEmpty(int imageIndex,
                               ImageTypeSpecifier imageType,
                               int width,
                               int height,
                               IIOMetadata imageMetadata,
                               List<? extends BufferedImage> thumbnails,
                               ImageWriteParam param)
                        throws IOException
See Also:
IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, UnsupportedOperationException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void prepareReplacePixels(int imageIndex,
                                 Rectangle region)
                          throws IOException
See Also:
IllegalArgumentException, IllegalStateException, IndexOutOfBoundsException, UnsupportedOperationException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void prepareWriteEmpty(IIOMetadata streamMetadata,
                              ImageTypeSpecifier imageType,
                              int width,
                              int height,
                              IIOMetadata imageMetadata,
                              List<? extends BufferedImage> thumbnails,
                              ImageWriteParam param)
                       throws IOException
See Also:
IllegalArgumentException, IllegalStateException, UnsupportedOperationException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void prepareWriteSequence(IIOMetadata streamMetadata)
                          throws IOException
See Also:
UnsupportedOperationException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processImageComplete()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processImageProgress(float percentageDone)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processImageStarted(int imageIndex)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processThumbnailComplete()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processThumbnailProgress(float percentageDone)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processThumbnailStarted(int imageIndex,
                                       int thumbnailIndex)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processWarningOccurred(int imageIndex,
                                      String warning)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processWarningOccurred(int imageIndex,
                                      String baseName,
                                      String keyword)
See Also:
IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected void processWriteAborted()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected List<IIOWriteProgressListener> progressListeners
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeAllIIOWriteProgressListeners()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeAllIIOWriteWarningListeners()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeIIOWriteProgressListener(IIOWriteProgressListener listener)
See Also:
addIIOWriteProgressListener(javax.imageio.event.IIOWriteProgressListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeIIOWriteWarningListener(IIOWriteWarningListener listener)
See Also:
addIIOWriteWarningListener(javax.imageio.event.IIOWriteWarningListener)
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void removeImage(int imageIndex)
                 throws IOException
See Also:
IndexOutOfBoundsException, UnsupportedOperationException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void replaceImageMetadata(int imageIndex,
                                 IIOMetadata imageMetadata)
                          throws IOException
See Also:
IndexOutOfBoundsException, UnsupportedOperationException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void replacePixels(Raster raster,
                          ImageWriteParam param)
                   throws IOException
See Also:
IllegalArgumentException, UnsupportedOperationException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void replacePixels(RenderedImage image,
                          ImageWriteParam param)
                   throws IOException
See Also:
IllegalArgumentException, IllegalStateException, UnsupportedOperationException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void replaceStreamMetadata(IIOMetadata streamMetadata)
                           throws IOException
See Also:
UnsupportedOperationException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void reset()
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setLocale(Locale locale)
See Also:
getLocale(), IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void setOutput(Object output)
See Also:
getOutput(), IllegalArgumentException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected List<IIOWriteWarningListener> warningListeners
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


protected List<Locale> warningLocales
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void write(RenderedImage image)
           throws IOException
See Also:
IllegalArgumentException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void write(IIOImage image)
           throws IOException
See Also:
UnsupportedOperationException, IllegalArgumentException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public abstract void write(IIOMetadata streamMetadata,
                           IIOImage image,
                           ImageWriteParam param)
                    throws IOException
See Also:
IllegalArgumentException, UnsupportedOperationException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


[564]Print out writeable formats - these are the default (JVM) types
By Anonymous on 2003/12/11 03:11:37  Rate
// Print out writeable formats - these are the default  ( JVM )  types 
 try  {  
   String [  ]  names = ImageIO.getWriterFormatNames (  ) ; 
   for ( int i=0; i  <  names.length; i++ )   {  
     System.out.println ( names [ i ]  ) ;  
    }  
  }   
 catch ( Exception ex )   {   }  
      
 BufferedImage buf = null;   
 try  {  
   buf = ImageIO.read ( new File ( "/home/public/tweedleDum.jpg" )  ) ; 
  }  catch ( IOException e )   {  
   System.out.println ( "IO Exception in buf read!" ) ; 
  }  
      
 IIOImage iioImage = new IIOImage (  
   buf,  
   new Vector (  ) , // dummy argument 
   null ) ; // dummy argument 
  
  
 File fOut = null; 
 FileImageOutputStream outPut = null; 
      
 try  {  
   fOut = new File ( "/home/public/tweedleDee.jpg" ) ; 
   outPut = new FileImageOutputStream ( fOut ) ; 
  }  catch ( FileNotFoundException fnfe )   {  
   // System.out.println ( "fnfe xxx" ) ; 
  }  catch ( IOException ioe )   {  
   // System.out.println ( "ioe xxx" ) ; 
  }   
  
  
 Iterator it = ImageIO.getImageWritersByFormatName ( "jpg" ) ; 
 if ( it.hasNext (  )  )   {  // just take the first one 
   ImageWriter iWriter =  ( ImageWriter ) it.next (  ) ; 
   iWriter.setOutput (  
     outPut 
    ) ; 
   try  {  
     iWriter.write ( buf ) ; 
    }  catch ( IOException ioe )   {  
     System.out.println ( "ioe xxx" ) ; 
    }  
  }  
  
  
 // done


public void writeInsert(int imageIndex,
                        IIOImage image,
                        ImageWriteParam param)
                 throws IOException
See Also:
UnsupportedOperationException, IndexOutOfBoundsException, IllegalArgumentException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  


public void writeToSequence(IIOImage image,
                            ImageWriteParam param)
                     throws IOException
See Also:
UnsupportedOperationException, IllegalArgumentException, IllegalStateException
Geek's Notes:
Description  Add your codes or notes  Search More Java Examples  

Popular Tags