import java.util.Arrays; import javax.imageio.ImageIO; public class Main { public static void main(String[] argv) throws Exception { String[] formatNames = ImageIO.getReaderFormatNames(); System.out.println(Arrays.toString(formatNames)); // e.g. png jpeg gif jpg } }