Image saved in JavaFX as jpg is pink toned

前端 未结 2 1963
无人共我
无人共我 2021-02-09 00:15

I want to save an Image from my ImageView to files with different resolutions. Doing it as .png results as expected. As for .jpg - I get all files pink toned.

2条回答
  •  失恋的感觉
    2021-02-09 01:12

    Update

    This issue was fixed for Java 8:

    JDK-8114609 Incorrect display of JPEG images


    It looks like you are encountering existing bugs in the ImageIO or JavaFX Image processing libraries.

    • RT-14647 Incorrect display of JPEG images

    You might wish to try some of the workarounds suggested in the StackOverflow questions below and see if any of them fix the issue for you:

    • problem using ImageIO.write jpg file
    • Java 1.5.0_16 corrupted colours when saving jpg image

提交回复
热议问题