PixelGrabber(Image img, int x, int y, int w, int h, booelan forceRGB) | コンストラクタ |
PixelGrabber(Image img, int x, int y, int w, int h, int[] pix, int off, int scansize) | コンストラクタ |
PixelGrabber(ImageProducer ip, int x, int y, int w, int h, int[] pix, int off, int scansize) | コンストラクタ |
ColorModel getColorModel() | 配列にある画素のためのColorModelを返す |
int getHeight() | 画素バッファの高さを返す |
int getHeight() | 画素バッファの幅を返す |
Object getPixels() | 画素バッファを返す |
boolean grabPixels() | 画像を要求する |
boolean grabPixels(long ms) | タイムアウト msを指定して画像を要求する |
PixelGrabber pg = new PixelGrabber(img,0,0,w,h,pixels,0,w); try { pg.grabPixels(); } catch (InterruptedException e) { showStatus(" "+ e); }のようにする. 配列pixelsの各要素には,4バイト(32bit)のデータがはいる. 最上位バイトから,透過度,R, G, Bの値が入る. 透過度は,255で不透明で,0で透明を意味する.