PixelGrabber vs Raster

Hi everybody,
I wanted to know the difference between PixelGrabber and Raster in Java AWT. Which is better in which scenario and why/how? Any response shall be highly appreciated.

Thanks.

Ulf Dittmer

Rancher

Posts: 42972

73

posted 7 years ago

PixelGrabber is kind of an old-fashioned way of working with images - it's been there since Java 1.0. But the whole image handling was expanded later, and (Writable)Raster is part of that. So if you can, go with Raster.

Note that Raster assumes that all pixels are present when you call it, though. PixelGrabber, on the other hand, can work with images that may not completely (or at all) exist when it is called.