Graphics g = buf.getGraphics();
g.drawImage(image, 0, 0, w, h, null);
long start = System.currentTimeMillis();
long blitTime, putImageTime, write;
GC gc = x11.XCreateGC(dpy, win, new NativeLong(0), null);
long gcTime = System.currentTimeMillis();
try {
Raster raster = buf.getData();
int[] pixel = new int[4];
for (int y=0;y < h;y++) {