Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-41330

Wrong colors in thumbnail for JPEG images with RGB color space

    Details

    • Type: Bug
    • Status: Closed
    • Resolution: Duplicate
    • Affects Version/s: 6.1.20 EE GA2, 6.2.0 CE RC5
    • Fix Version/s: 7.0.0 M3
    • Component/s: Documents & Media
    • Labels:
      None

      Description

      When uploaded to the Documents and Media, some JPEG images produce a thumbnail with wrong colors, i.e. a pinkish shade instead of white.

      Other tools (e.g. Jira & The GIMP) open the image properly with not even a warning. After re-saving the image with GIMP, it uploads as expected. I found no EXIF or IPTC metadata (using the exiv2 tool). Having debugged a simple C program linked against libjpeg, the original and the re-saved images differ in their color space: JCS_RGB and JCS_YCbCr, respectively. Eclipse SWT suffered from the same issue in 2006: external link.

      The related Portal code is ImageToolImpl's read(byte[], String) method. It utilizes the somewhat old third-party JAI to decode image data.

      I attached an image that produces the issue on trunk.

        Attachments

        1. cinfo_dump_bad.txt
          34 kB
        2. cinfo_dump_good.txt
          34 kB
        3. im1.jpeg
          im1.jpeg
          29 kB

          Issue Links

            Activity

              People

              Assignee:
              jozsef.illes József Illés (Inactive)
              Reporter:
              jozsef.illes József Illés (Inactive)
              Participants of an Issue:
              Recent user:
              Esther Sanz
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                6 years, 51 weeks, 2 days ago

                  Packages

                  Version Package
                  7.0.0 M3