PHP Developers Network

A community of PHP developers offering assistance, advice, discussion, and friendship.
 
Loading
It is currently Tue Mar 31, 2020 1:59 pm

All times are UTC - 5 hours




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Sun Aug 13, 2006 12:57 pm 
Offline
Forum Newbie

Joined: Wed May 24, 2006 10:14 am
Posts: 19
Location: New Zealand
I've created an application to write dynamic images to a web page using the html img tag.

i.e
Syntax: [ Download ] [ Hide ]
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

Syntax: [ Download ] [ Hide ]
$imgBlob = $sqlRow["imageBlob"];

  $src = imagecreatefromstring($imgBlob);

  $tmpname = tempnam("","");

  imagegif($src,$tmpname);

  list($width, $height, $mimeType, $attr) = getimagesize($tmpname);

  header("Content-Type: ".image_type_to_mime_type($mimeType));

  header("Cache-Control: max-age=86400, public, must-revalidate");

  header("Content-Length: ".filesize($tmpname));

  imagegif($src);


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.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group