Jump to content

PNG problem


AV1611

Recommended Posts

I am running apache on Fedora Core 5 and have an unusual problem:

If I do this:

<a href=my.png width=100><img src=my.png /></a>

the thumbnail displays fine, but when I click it I get the binary for the png when viewed in firefox, but I get the pic in IE...

I can do bmp, jpg, gif the same way, with no problems..

How do I fix it?

Is in an httpd.conf thing? 

HELP!
Link to comment
https://forums.phpfreaks.com/topic/17728-png-problem/
Share on other sites

  • 3 weeks later...
I don't think this is an Apache configuration issue - I know what you mean though as a site I visit regularly doesn't display full sized images in FireFox, I just get a bunch of garbage text. I have a feeling it's an OS issue, but I don't know for sure. But as far as I know, there are no configuration options for image support in Apache.
Link to comment
https://forums.phpfreaks.com/topic/17728-png-problem/#findComment-86293
Share on other sites

AV,

This sounds like a browser/client issue with Firefox. It should be fixed with the latest update (from what I understand). If you continue to get the error, its because png headers are not being forced by the browser. You can force it by writing PHP/GD script that looks something like this:

[code]
<?PHP

header ("Content-type: image/png");

$im = imagecreatefrompng($_GET['img']);
imagepng($im);

?>[/code]

That way you can display a full GD image with a URI like: script.php?img=path/to/img.png

Ryan
Link to comment
https://forums.phpfreaks.com/topic/17728-png-problem/#findComment-86809
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.