Error thrown from getGraphics method of a BytePacked BufferedImage

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P2
    • 1.4.0
    • Affects Version/s: 1.4.0
    • Component/s: client-libs
    • None
    • 2d
    • beta
    • generic
    • generic

      The following test case will allow the BufferedImage to be constructed
      but will throw an InternalError from the 2D implementation when a
      Graphics object is fetched from the image.

      import java.awt.image.IndexColorModel;
      import java.awt.image.BufferedImage;
      import java.awt.image.DataBuffer;
      import java.awt.image.WritableRaster;
      import java.awt.image.Raster;

      public class BytePackedICMTest {
          static byte vals[] = { 0, -1 };

          public static void main(String args[]) {
      IndexColorModel icm = new IndexColorModel(8, 2, vals, vals, vals);
      WritableRaster raster =
      Raster.createPackedRaster(DataBuffer.TYPE_BYTE,
      1, 1, 1, 1, null);
      BufferedImage bi = new BufferedImage(icm, raster, false, null);
      bi.getGraphics().dispose();
          }
      }

            Assignee:
            Jim Graham
            Reporter:
            Jim Graham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: