ImageIO not able to write a JPEG file

后端 未结 5 1578
萌比男神i
萌比男神i 2020-12-01 06:16

I have a BufferedImage I\'m trying to write to a jpeg file, but my Java program throws an exception. I\'m able to successfully save the same buffer to a gif and png. I\'ve t

5条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-01 06:36

    I had the same issue in OpenJDK 7 and I managed to get around this exception by using an imageType of TYPE_3BYTE_BGR instead of TYPE_4BYTE_ABGR using the same OpenJDK.

提交回复
热议问题