java的 ImageIO.read() 变红bug处理

java的 ImageIO.read()方法会导致某些图片变红。
参考如下资料

  1. http://www.oschina.net/question/1092_23668?sort=default&p=2#answers
  2. http://stackoverflow.com/questions/13605248/java-converting-image-to-bufferedimage
  3. http://blog.csdn.net/yang3wei/article/details/9293811
  4. http://blog.csdn.net/kobejayandy/article/details/44346809
  5. http://stackoverflow.com/questions/2408613/unable-to-read-jpeg-image-using-imageio-readfile-file
  6. http://blog.csdn.net/cctt_1/article/details/17580327

JPEGImageDecoder decoder = JPEGCodec.createJPEGDecoder(in);
retImage = decoder.decodeAsBufferedImage();

你可能感兴趣的:(java的 ImageIO.read() 变红bug处理)