Zistenie farby pixelu.

<? 
$im = @ImageCreateFromGif('obrazok.gif'); /* Skus otvorit */ 
if ($im == "") { /* Ak nemoze otvorit */ 
   $im = ImageCreate(100, 30); 
   $bgc = ImageColorAllocate($im,255,255,255); 
   $tc = ImageColorAllocate($im,0,0,0); 
   ImageFilledRectangle($im, 0, 0, 150, 30, $bgc); 
   ImageString($im, 1, 10, 10, "Error loading", $tc); /* Vypise chybu */ 
}else{ 
   $nc = ImageColorAt($im, 16, 10); /* Zisti index farby pixelu */ 
   //ImageColorAt(image, x, y); 
 
   ImageString($im, 1, 10, 13, "Ahoj", $nc); 
} 
 
Header("Content-type: image/gif"); 
ImageGif($im); 
?>