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

前端 未结 3 1630
悲&欢浪女
悲&欢浪女 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条回答
  •  没有蜡笔的小新
    2021-01-06 11:58

    You create after and then overwrite it with scaleOp.filter. Is this correct? So your after image may not be RGB even though you think it is? If you want after to be RGB then you may need to 'draw' image onto after before you do the transform.

提交回复
热议问题