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

The createCompatibleSampleModel() method does not give correct scanlineStride.

XMLWordPrintable

    • 2d
    • 1.2beta4
    • generic
    • generic
    • Not verified

      The createCompatibleSampleModel() method in both PixelInterleavedSampleModel and BandedSampleModel, when given a width and height that's smaller than the original width and height, does not reset scanlineStride according to the new width and height. This causes error when creating a Raster using the new sampleModel because the buffer size is based on width and height, yet the scanlineStride does not match the buffer size.

      A test program showing the bug is attached.

            jehung Jeannette Hung
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: