($rgb1 >> 16) & 0xFF, 'g' => ($rgb1 >> 8) & 0xFF, 'b' => $rgb1 & 0xFF ); $pix1 = imagecolorsforindex($i1, $rgb1); $rgb2 = imagecolorat($i2, $x, $y); $pix2 = array( 'r' => ($rgb2 >> 16) & 0xFF, 'g' => ($rgb2 >> 8) & 0xFF, 'b' => $rgb2 & 0xFF ); $pix2 = imagecolorsforindex($i2, $rgb2); //echo implode(',',$pix1) . ' - ' . implode(',',$pix2) . "\n"; if ($pix1 != $pix2) { return false; } } } return true; }//function imageisthesame($file1, $file2) ?>