Jump to content


Photo

PNG problem


  • Please log in to reply
3 replies to this topic

#1 AV1611

AV1611
  • Members
  • PipPipPip
  • Advanced Member
  • 997 posts

Posted 16 August 2006 - 12:14 PM

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!

#2 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 04 September 2006 - 09:56 PM

PNG are diffrant file and reqiure diifrant settings its best not to use them.
Join my Froums www.phpbbplanet.com/darkwinter

#3 Kris

Kris
  • Staff Alumni
  • Advanced Member
  • 2,755 posts
  • LocationThe Internet

Posted 05 September 2006 - 12:19 PM

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.

#4 R_P

R_P
  • Members
  • PipPipPip
  • Advanced Member
  • 98 posts

Posted 06 September 2006 - 12:34 AM

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:

<?PHP

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

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

?>

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

Ryan
Pro in: Win2K3S | Apache2 | PHP5 | Perl5 | MySQL | MSSQL | Firefox | Photoshop
Student of: Ubuntu6 | Java | C | VB.NET | ASP.NET
Developer: Roddzilla Webstudios, Burrson CG, DVIDSHUB, The Four Nations
Student: Georgia Tech, Georgia Tech College of Computing




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users