Jump to content

Archived

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

AV1611

PNG problem

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!

Share this post


Link to post
Share on other sites
PNG are diffrant file and reqiure diifrant settings its best not to use them.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

×

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.