java buffered image created with red mask

前端 未结 6 1688
忘了有多久
忘了有多久 2020-12-04 02:49

I am having trouble reading an image. If I do the following

URL url = new URL(\"http://tctechcrunch2011.files.wordpress.com/2012/10/gmm.jpg\");
ImageInputSt         


        
6条回答
  •  攒了一身酷
    2020-12-04 03:19

    Sorry. I don't have the answer to why there is a red tint.

    This is how we read images in our software. In our case we are using the scalar library to resize the image.

    URL url = new URL("http://tctechcrunch2011.files.wordpress.com/2012/10/gmm.jpg");
    BufferedImage source = javax.imageio.ImageIO.read(url);
    BufferedImage manipulated = ...
    FileOutputStream fos = new FileOutputStream("badimage.jpeg");
    javax.imageio.ImageIO.write(manipulated , "png", fos);
    

提交回复
热议问题