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

ImageIO fails to read a corrupted JPEG image

XMLWordPrintable

    • b03
    • generic
    • generic
    • Verified

      I tried reading a corrupted JPEG image using ImageIO as well as Toolkit API. Toolkit API is able to read this image properly where as ImageIO returns an image where the colors are totally distorted. I also tried reading this image using JPEGImageDecoderImpl but the VM crashes. However, a separate bug has been filed against this VM crash.

      How to reproduce:
      I have attached a sample code and the corrupted image. Save them in the same directory and run the sample code. You would see 2 different images. The first image will be normal(Toolkit API) where as the colors will be inverted in the second image (ImageIO).
      I am able to reproduce this with JDK1.4.0 as well as JDK 1.4.2 - b19, on Solaris and Win32 platforms.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: