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

Wrong colors in JPEG files

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Not an Issue
    • Affects Version/s: 7u6
    • Fix Version/s: 8
    • Component/s: javafx
    • Labels:
    • Environment:

      Windows 7, 32 bit, JDK 7 u4, JavaFX 2.2 b17, JAI and JAI Image IO

      Description

      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.

        Attachments

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

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:
                Imported: