Returns true if the specified format name can be read
import java.io.File; import java.util.Iterator; import javax.imageio.ImageIO; public class Main { public static void main(String[] argv) throws Exception { boolean b; b = canReadFormat("yourExtensionName"); b = canReadFormat("gif"); b = canReadFormat("giF"); } public static boolean canReadFormat(String formatName) { Iterator iter = ImageIO.getImageReadersByFormatName(formatName); return iter.hasNext(); } }