dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java
Expertise: Intermediate
May 18, 2007

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


What Image Formats Does Your Java Application Support?

Use this application to determine what image formats you can load and save in J2SE.

import javax.imageio.*;

class picture{

 public picture(){}
                        
 void RWF()
  {  
  //read image formats
  System.out.println("R-IF:");
  String[] readFormats=ImageIO.getReaderFormatNames();            
  for(int i=0;i<readFormats.lengthi++)
        System.out.println(readFormats[i]);

  //write image formats
  System.out.println("W-IF:");
  String[] writeFormats=ImageIO.getWriterFormatNames();            
  for(int i=0;i<writeFormats.length;i++)
        System.out.println(writeFormats[i]);                 
  }
 }

public class ReadWriteFormats{
  public static void main(String[] args)
    {             
    picture t=new picture();              
    t.RWF();
    }
}
Leonard Anghel
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date