Reading JPEGs: ImageIO.read() messes up color space

前端 未结 3 1637
悲&欢浪女
悲&欢浪女 2021-01-06 11:06

I\'m trying to read, rescale and save images within a Servlet. That\'s the relevant code:

BufferedImage image = ImageIO.read(file);

BufferedImage after = ne         


        
3条回答
  •  萌比男神i
    2021-01-06 11:50

    I have had the same problem, and found this page.

    I tried the suggestion above of creating a BufferedImage with the right type and using it as the after image instead of null in the filter call; and that did indeed resolve the problem.

提交回复
热议问题