Only these five image formats have support by Java by default: JPEG, PNG, BMP, WEBMP, and GIF. Our program won't be able to read an image file in a different format, and attempting to use the BufferedImage variable will result in a NullPointerException.