Warning: session_start(): open(/var/lib/php/sessions/sess_2qmk0g0j82o5jji9fahqq1cvkd, O_RDWR) failed: No space left on device (28) in /var/www/tb-usercake/models/config.php on line 51
Warning: session_start(): Failed to read session data: files (path: /var/lib/php/sessions) in /var/www/tb-usercake/models/config.php on line 51
// The hash for an image without alpha channel is guaranteed to be
// identical for a completely opaque image with alpha.
srecord noeq HashBufferedImage(BufferedImage img) {
long hash;
long get() {
if (img == null) ret hash;
var gp = grabbableIntPixels_fastOrSlow(img);
bool hasAlpha = hasAlpha(img);
var ping = pingSource();
int[] pixelsIn = gp.data;
int w = gp.w, h = gp.h;
int scanlineExtra = gp.scanlineStride-w;
int iIn = gp.offset;
addToHash(w);
addToHash(h);
for y to h: {
for x to w: {
int packed = pixelsIn[iIn++];
if (!hasAlpha) packed |= 0xFF000000;
addToHash(packed);
}
iIn += scanlineExtra;
ping?!;
}
ret hash;
}
void addToHash(long x) {
hash = boostHashCombine64(hash, x);
printVars ifdef HashBufferedImage_debug(x := longToHex(x), +hash);
}
}