public GifEncoder(Image image, ProgressMonitor monitor) throws AWTException {
width_ = (short)image.getWidth(null);
height_ = (short)image.getHeight(null);
int values[] = new int[width_ * height_];
PixelGrabber grabber;
if (monitor != null) {
grabber = new MyGrabber(monitor, image, 0, 0, width_, height_, values, 0, width_);
} else {
grabber = new PixelGrabber(image, 0, 0, width_, height_, values, 0, width_);
}
try {
if (grabber.grabPixels() != true)
throw new AWTException(Strings.get("grabberError") + ": "
+ grabber.status());
} catch (InterruptedException e) {
;
}
byte r[][] = new byte[width_][height_];