PixelGrabber doesn't work with BufferedImage

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P4
    • None
    • Affects Version/s: 1.2.0
    • Component/s: client-libs
    • None
    • 2d
    • sparc
    • solaris

      I'm writing a program to graph data and write the result as a GIF file. To this end it graphs in a BufferedImage and uses a GIF-encoding class which extracts the pixels using java.awt.image.PixelGrabber (it was based on 1.1).

      However, when given this image PixelGrabber throws a NullPointerException. I'm sure there's other legacy code which will have the same problem.

      I've put together a small program which demostrarates the bug. When it runs, the exception trace is:

      java.lang.NullPointerException
              at java.awt.image.PixelGrabber.grabPixels(PixelGrabber.java:241)
              at java.awt.image.PixelGrabber.grabPixels(PixelGrabber.java:217)
              at PixelGrabberTest.main(PixelGrabberTest.java:68)

            Assignee:
            Jeannette Hung (Inactive)
            Reporter:
            J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: