Warning: session_start(): open(/var/lib/php/sessions/sess_aj7s8194qk5h2vjildq7uno4aq, 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
// drawing the resulting image on img1 gives img2
static BufferedImage imageDifferenceAsTransparentOverlay(BufferedImage img1, BufferedImage img2) {
int w = img1.getWidth(), h = img1.getHeight();
assertSameSize(img1, img2);
int[] pixels = new int[w*h];
GrabbableIntPixels gp1 = grabbableIntPixels_fastOrSlow(img1);
GrabbableIntPixels gp2 = grabbableIntPixels_fastOrSlow(img2);
int iPixels1 = gp1.offset, iPixels2 = gp2.offset;
int[] pixels1 = gp1.data, pixels2 = gp2.data;
int iPixels = 0;
for y to h: {
for x to w: {
int pix;
if (pixels1[iPixels1+x] != (pix = pixels2[iPixels2+x]))
pixels[iPixels++] = pix;
}
iPixels1 += gp1.scanlineStride-w;
iPixels2 += gp2.scanlineStride-w;
}
ret newBufferedImageWithAlpha(pixels, w, h);
}