Connecting Tech Pros Worldwide Help | Site Map

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

  #1  
Old July 17th, 2005, 10:21 AM
jerrygarciuh
Guest
 
Posts: n/a
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;
}




  #2  
Old July 17th, 2005, 10:21 AM
Andy Hassall
Guest
 
Posts: n/a

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


On Fri, 29 Oct 2004 13:59:04 -0500, "jerrygarciuh"
<designs@no.spam.nolaflash.com> wrote:
[color=blue]
>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?[/color]

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 / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
  #3  
Old July 17th, 2005, 10:21 AM
Theo
Guest
 
Posts: n/a

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


Andy Hassall <andy@andyh.co.uk> wrote in
news:tk65o01dkjlejtjps745jghj2nk3eu9e3k@4ax.com:
[color=blue]
> 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].
>[/color]

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.
  #4  
Old July 17th, 2005, 10:22 AM
jerrygarciuh
Guest
 
Posts: n/a

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


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" <andy@andyh.co.uk> wrote in message
news:tk65o01dkjlejtjps745jghj2nk3eu9e3k@4ax.com...[color=blue]
> On Fri, 29 Oct 2004 13:59:04 -0500, "jerrygarciuh"
> <designs@no.spam.nolaflash.com> wrote:
>[color=green]
>>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?[/color]
>
> 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 / <andy@andyh.co.uk> / <http://www.andyh.co.uk>
> <http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool[/color]


Closed Thread