How do I make java's ImageBuffer to read a PNG file correctly?

前端 未结 3 1109
一生所求
一生所求 2021-01-12 03:02

For some reason, opening up some PNG files using ImageBuffer and ImageIO does not work. Here\'s some code I am using that works fine for resizing/cropping JPGs:



        
3条回答
  •  一整个雨季
    2021-01-12 04:06

    A workaround solution would be to convert the file to jpeg first, and then process it. The type 0 bug seems to mostly affect PNG images.

提交回复
热议问题