Java read different type of image formats jpg,tif,gif,png
问题 I am trying to read some image files jpg, tif, gif, png and need to save files and create icons. And i am getting UnsupportedTypeException . ImageIO.read(file); If i use following line, as earlier discuss in form. BufferedImage img = JPEGCodec.createJPEGDecoder(inputStream).decodeAsBufferedImage(); I get JPEGCodec cannot found symbol. I am using netbean 7.0.1. I have also added jai-imageio.jar. 回答1: By default, ImageIO can only read JPG, GIF and PNG file formats, if I remember right. To add