int_pixel_buffer[i] = currentModel.getRGB (pixels[p]);
int_pixel_buffer[i] = currentModel.getRGB (pixels[p] & 0xFF);
  public synchronized void setPixels(int x, int y, int w, int h, 				     ColorModel model, byte[] pixels,				     int offset, int scansize)  {    ColorModel currentModel;    if (model != null)      currentModel = model;    else      currentModel = this.model;    for(int yp = y; yp < (y + h); yp++)      {	for(int xp = x; xp < (x + w); xp++)	  {	    // Check if the coordinates (xp, yp) are within the	    // pixel block that we are grabbing.	    if(xp >= this.x	       && yp >= this.y	       && xp < (this.x + this.width)	       && yp < (this.y + this.height))	      {		int i = (yp - this.y) * this.scansize + (xp - this.x) + this.offset;		int p = (yp - y) * scansize + (xp - x) + offset;		if (forceRGB)		  {		    ints_delivered = true;		    assert (i >= 0 && i < int_pixel_buffer.length);		    assert (p >= 0 && p < pixels.length);		    int_pixel_buffer[i] = currentModel.getRGB (pixels[p]);		  }		else		  {		    bytes_delivered = true;		    assert (i >= 0 && i < byte_pixel_buffer.length);		    assert (p >= 0 && p < pixels.length);		    byte_pixel_buffer[i] = pixels[p];		  }	      }	  }      }  }