|PHP Developers Network
|Solved - IE and dynamic images using GD2 imagegif
|Page 1 of 1|
|Author:||Dr.Goodvibes [ Sun Aug 13, 2006 12:57 pm ]|
|Post subject:||Solved - IE and dynamic images using GD2 imagegif|
I've created an application to write dynamic images to a web page using the html img tag.
echo "<img src='image.php' alt='dynamic image' />";
This all works fine, however using IE6 and IE7 horizontal white lines appear across the image as it is displayed. These lines disappear if the screen is resized or another desktop application covers the browser page and is then removed. So it appears as if IE is just loading/buffering/displaying the image poorly.
The image is initially read into a MySQL database as a blob and then retrieved to be displayed to the screen.
The files are generally gifs of sizes around 50KB
$imgBlob = $sqlRow["imageBlob"];
$src = imagecreatefromstring($imgBlob);
$tmpname = tempnam("","");
list($width, $height, $mimeType, $attr) = getimagesize($tmpname);
header("Cache-Control: max-age=86400, public, must-revalidate");
I have tried creating a new image and copying the original into it.
Also displaying the image to a buffer and then displaying the buffer, but nothing seems to stop these little white lines appearing in IE.
Oh and I have tried displaying the images as JPEG with the same result.
Any ideas on how to get rid of these white lines in IE on display?
*** Update 16-AUG-2006 ***
Hmmm... The problem doesn't seem to lie with the displaying of the dynamic image.
I have deconstructed the web page and at it's basics the IE image displays fine.
I notice in other pages where I have a static image size it also displaying fine in IE.
It appears IE is having problems with the HTML layout I have constructed. I'm using CSS float:left and float:right and creating a DIV of variable size to house the image.
I'll get to the bottom of this yet.
*** Update 23-AUG-2006 ***
All Solved. So this is just a note for reference.
Using MSIE 7.0 and MSIE 6.0 you may experience display problems using dynamic images.
I found this to be the over complicated CSS and HTML structure I had.
I had CSS float:left and float:right and many html DIV statements.
I streamlined this and now MSIE 7.0 and MSIE 6.0 display the images without any problems.
Opera and Firefox never had any problems displaying these images in the first place.
|Page 1 of 1||All times are UTC - 5 hours|
|Powered by phpBB® Forum Software © phpBB Group