470,833 Members | 1,190 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

Has anyone had problems with IE not showing thumbnailed gifs when Firefox and NN show them fine?

Hello everyone,
Wondering if anyone else has had problems with gifs created by php or if

anyone sees a problem with this code.
Symptom: created jpegs work fine and created gifs work fine in Netscape and

Firefox and when directly viewed.
IE displays gif fine *via internet* BUT off of a CD or local HTML file it

won't display the file.
I have run a dozen gifs through the process and it has happened to every one

of them.
Any advice?
TIA,
jg
function thumbnail ($src_file, $path) {
$orig = $path . '/' . $src_file;
list($w,$h,$type) = getimagesize($orig);
if ($type == 2) { // jpeg
$src_img = imagecreatefromjpeg("$orig");
$name = "thmb_" . $src_file;
$thmb_and_path = $path . $name;
if(!file_exists($thmb_and_path)) {
$image_info = getimagesize($orig);
$src_width = $image_info[0];
$src_height = $image_info[1];
$dest_height= 80;
$dest_width = ($dest_height/$src_height) * $src_width;
$quality = 30;
$dst_img = imagecreatetruecolor($dest_width,$dest_height);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width,
$dest_height, $src_width, $src_height);
imagejpeg($dst_img, $thmb_and_path, $quality);
chmod("$thmb_and_path", 0777);
imagedestroy($src_img);
imagedestroy($dst_img);
}
} else if ($type == 1) { // gif
$src_img = imagecreatefromgif("$orig");
$name = "thmb_" . $src_file;
$thmb_and_path = $path . $name;
if(!file_exists($thmb_and_path)) {
$image_info = getimagesize($orig);
$src_width = $image_info[0];
$src_height = $image_info[1];
$dest_height= 80;
$dest_width = ($dest_height/$src_height) * $src_width;
$quality = 30;
$dst_img = imagecreatetruecolor($dest_width,$dest_height);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $dest_width,
$dest_height, $src_width, $src_height);
imagejpeg($dst_img, $thmb_and_path, $quality);
chmod("$thmb_and_path", 0777);
imagedestroy($src_img);
imagedestroy($dst_img);
}
}
return $thmb_and_path;
}


Jul 17 '05 #1
3 1915
On Fri, 29 Oct 2004 13:59:04 -0500, "jerrygarciuh"
<de*****@no.spam.nolaflash.com> wrote:
Wondering if anyone else has had problems with gifs created by php or if
anyone sees a problem with this code.
Symptom: created jpegs work fine and created gifs work fine in Netscape and
Firefox and when directly viewed.

IE displays gif fine *via internet* BUT off of a CD or local HTML file it

won't display the file.

I have run a dozen gifs through the process and it has happened to every one
of them.

Any advice?


Is this one at a time, or the infamous IE bug where it randomly fails to
display images if there's (a) lots of them on a page and (b) it's reading from
a high speed medium [LAN or disk].

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
Andy Hassall <an**@andyh.co.uk> wrote in
news:tk********************************@4ax.com:
Is this one at a time, or the infamous IE bug where it randomly fails
to
display images if there's (a) lots of them on a page and (b) it's
reading from a high speed medium [LAN or disk].


so thats why Ive been randomly seeing this as well the last few days on a
page with quite a few large thumbs. I thought it was the code but I could
never find the problem.

This company can afford to pay many millions of dollars to get the best
programmers in the world and spend many more millions in testing, yet stuff
like this still happens. Shame, and more shame, nothing but shame.
Jul 17 '05 #3
Andy,

Thnaks for the reply.

The problem I am having occurs even when a single thumbnailed gif is alone
on a page. It only occurs locally (eg from hard drive or cd). It only
occurs with gifs, and the thumbs work fine in Firefox and Netscape.

My suspicion is that the fact that the thumbs are created in Unix and work
when delivered from Unix but not when they are housed on a Windows box is
significant.

I'll post back here if I find a solution.

jg
"Andy Hassall" <an**@andyh.co.uk> wrote in message
news:tk********************************@4ax.com...
On Fri, 29 Oct 2004 13:59:04 -0500, "jerrygarciuh"
<de*****@no.spam.nolaflash.com> wrote:
Wondering if anyone else has had problems with gifs created by php or if
anyone sees a problem with this code.
Symptom: created jpegs work fine and created gifs work fine in Netscape
and
Firefox and when directly viewed.

IE displays gif fine *via internet* BUT off of a CD or local HTML file it

won't display the file.

I have run a dozen gifs through the process and it has happened to every
one
of them.

Any advice?


Is this one at a time, or the infamous IE bug where it randomly fails to
display images if there's (a) lots of them on a page and (b) it's reading
from
a high speed medium [LAN or disk].

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool

Jul 17 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by tshad | last post: by
1 post views Thread by edfialk | last post: by
2 posts views Thread by tshad | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.