srecord noeq HashBWImage(BWImage img) { long hash; long get() { if (img == null) ret hash; int w = img.getWidth(), h = img.getHeight(); var pixels = img.pixels; int n = w*h; byte[] pixels = img.pixels; hash = boostHashCombine64(hash, w); hash = boostHashCombine64(hash, h); for i to n: hash = boostHashCombine64(hash, pixels[i]); ret hash; } }