Hi guys, i'm trying to show image with grayscale-filter. Here is my code:
$images = glob('gallery/*small*');
shuffle($images);
array_splice($images, 3);
$imgHandles = array();
$imgBuffered = array();
for( $i = 0; $i < 3; $i++)
{
$imgHandles[$i] = imagecreatefromstring( file_get_contents($images[$i]) );
imagefilter( $imgHandles[$i], IMG_FILTER_GRAYSCALE );
ob_start();
imagepng( $imgHandles[$i] );
$imgBuffered[$i] = ob_get_contents();
ob_end_clean();
imagedestroy( $imgHandles[$i] );
}
And outputting:
for( $i = 0; $i < 3; $i++ )
{
echo "<a href=\"gallery.php\">
<img class=\"photo\" src='data:image/png;base64,".base64_encode( $imgBuffered[$i] )."' /></a>";
}
In opera, ff, chrome, safari everything is fine, but ie6 doesn't show images. Why?
I made code like at page: http://dean.edwards.name/weblog/2005/06/base64-ie/ I see pictures, but in some seconds they hide... I really don't know why. Can you help me with this stuff?