Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8119048

Wrong colors in JPEG files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • 8
    • 7u6
    • javafx
    • Windows 7, 32 bit, JDK 7 u4, JavaFX 2.2 b17, JAI and JAI Image IO

      I tried to save an image from a JavaFX application. As this is not directly supported I had to convert the image to a BufferedImage and then save the image via ImageIO. After doing this I realized that when I tried to write the image in JPEG format, the colors are wrong. If I try to save the image in TIFF format, the colors are ok. In order to be able to write the TIFF format I had to install Java Advanced Imaging (JAI) and JAI image IO, which may make a difference. There are other JIRA entries complaining about wrong colors in JPEG files (RT-14647 for example) but they are mostly about importing files from specific cameras. But maybe this entry is somehow related to these other issues because the visual results look very similar.
      See attachements for further details.

        1. image1.jpg
          108 kB
          Dr. Michael Paus
        2. ImageIOJpegBug.java
          2 kB
          Dr. Michael Paus
        3. JpegWriteBug.java
          0.8 kB
          Dr. Michael Paus
        4. piechart.jpeg
          152 kB
          Dr. Michael Paus
        5. piechart.png
          222 kB
          Dr. Michael Paus
        6. PieChartExport.java
          3 kB
          Dr. Michael Paus
        7. written.jpg
          64 kB
          Dr. Michael Paus
        8. written.tif
          994 kB
          Dr. Michael Paus

            kcr Kevin Rushforth
            dpausjfx Dr. Michael Paus (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: