I tried this simple test on a single line of text, the background needs to be the same colour, so it is a very simplified test.
<?
$im = imagecreatefrompng ( 'words.png' );
$x = imagesx( $im );
$y = imagesy( $im );
for( $xx = 0;$xx<$x;$xx++ ) {
$different = 'the same.';
for( $yy=0;$yy<$y;$yy++ ) {
if( $yy==0 ) {
$c = imagecolorat ( $im, $xx, $yy );
continue;
} else {
if( $c != imagecolorat ( $im, $xx, $yy ) ) {
$different = 'different.';
}
}
}
echo "Line $xx is $different<br>\n";
}
?>