ImageIO reads JPEG/TYPE_3BYTE_BGR incorrectly

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: P4
    • None
    • Affects Version/s: 8u11
    • Component/s: client-libs

      FULL PRODUCT VERSION :
      Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      CentOS 6.5

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      server environment,

      A DESCRIPTION OF THE PROBLEM :
      Given image: JPEG, exported from Adobe Lightroom 4 (regular export to sRGB, no any tricks/patches/file changes). Image is successfully read by all known tools.

      In Java code image is read using ImageIO.read(InputStream).

      on MS Windows (same JDK) image is read OK.
      on Linux image is read OK, but has wrong color values

      tested via getting RGB pixel (getRGB(100,100) at same location of resulting buffered image in both cases, right after reading. RGB values are different. Windows JDK gives correct value, Linux JDK's value is invalid (corresponds to colors of reduced size thumbnail presented above).

      Issue above relates to all images exported this way.



      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Path path = Paths.get("path-to-file");
      InputStream inputStream = Files.newInputStream(path);
      BufferedImage result = ImageIO.read(inputStream);
      int value = result.getRGB(100,100);

      value is different on Windows 7 and CentOS Linux for the same file.
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      none found with respect to ImageIO.

            Assignee:
            Philip Race
            Reporter:
            Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: