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

BMP Reader fails to read the TYPE_BYTE_GRAY image encoded by BMP Writer with BI_RLE8 compression

XMLWordPrintable

    • b63
    • generic
    • generic
    • Verified

      I am encoding a TYPE_BYTE_GRAY image using BMP Writer with an ImageWriteParam set with the compression type - BI_RLE8. When I read back the output image using corresponding BMP Reader, the image is not completely read and only 3/4th of the image gets loaded. Rest of the image looks black.

      This is reproducible on all platforms since Tiger-FCS. (On tiger/mustang builds other than b56 PIT build, you would see an extra NPE with BI_BITFIELDS that is due to the bug - 6294960). But actually the image is created properly and all the native image viewers are able to load the image properly.

      I have attached a sample test and an image.
      Run the attached test as follows:
      'java BMPWriterByteGrayTest bmp'.
      You would see many images being loaded on to a frame, typically one for each compression type. If the third image is not loaded completely, the bug is reproduced.

            bae Andrew Brygin
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: