static BWImage img_bw_vdiff(BWImage a) { int w = a.w(), h = a.h()-1; BWImage b = new BWImage(w, h); for y to h: for x to w: b.setPixel(x, y, Math.abs(a.getPixel(x, y)-a.getPixel(x, y+1))); ret b; }