|
Display available ImageReaders and ImageWriters by image format and MIME type
import javax.imageio.ImageIO;
/**
* RWtypes.java - a class to display available ImageReaders and ImageWriters by
* image format and MIME type
*/
public class RWtypes {
public static void main(String[] args) {
String[] readers, writers;
System.out.println("For Reading:");
readers = ImageIO.getReaderFormatNames();
System.out.println("\tBy format:");
for (int i = 0; i < readers.length; i++)
System.out.println("\t\t" + readers[i]);
readers = ImageIO.getReaderMIMETypes();
System.out.println("\tBy MIME Types:");
for (int i = 0; i < readers.length; i++)
System.out.println("\t\t" + readers[i]);
System.out.println("For Writing:");
writers = ImageIO.getWriterFormatNames();
System.out.println("\tBy format:");
for (int i = 0; i < writers.length; i++)
System.out.println("\t\t" + writers[i]);
writers = ImageIO.getWriterMIMETypes();
System.out.println("\tBy MIME Types:");
for (int i = 0; i < writers.length; i++)
System.out.println("\t\t" + writers[i]);
}
}
__________________
Want to make your IDE the best? To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts. to our beloved Java Forums! (closes on July 27, 2008)
|