检测ImageIo支持的图片类型

Java ImageIO

检测ImageIo支持的图片类型

public static void main(String args[]) {
    String readFormats[] = ImageIO.getReaderFormatNames();
    String writeFormats[] = ImageIO.getWriterFormatNames();
    System.out.println("Readers:  " + Arrays.asList(readFormats));
    System.out.println("Writers:  " + Arrays.asList(writeFormats));
}

你可能感兴趣的:(检测ImageIo支持的图片类型)