PNG wird nicht richtig dargestellt

tobiastt

Erfahrenes Mitglied
Hallo

ich habe da ein Problem. Ich lege eine png Datei an und will mir die anzeigen lassen aber es kommt so war raus:

 IHDRX,bS% PLTEÿÿÿÿF6 ¼IDATxœí?Ínë(DZKQW)Ù³¼ê*šÕ,©Ý»R¼™§áQ²e5ëyº1àØæãðUÀô–ÿÕm ?ï =Š"¨@µËCËGËGËGËGcP?õ,ÜŒó¯H çÅêŠÔsŒù÷‚õ çˆ5kG¬Ã{?¢[?v cDôßÀŽXxªä±9ï€uE×æŠÞ_û©-5h ¡þ•þæá÷×)¦ï³cÑbÑŒu 8ÍŠ…f¬œPÖÈ°šfœ°Æþurà¸`?{`!îÇb(ˆb!´x«Ù «™±X^)ÖiÁzß ‹Ÿ‰‹Ÿ‰S7zBìLœŽ›é~¬U±|T±|T±|T±|T±|T±|T±|T±|” åJ?ÕÞò%Æ:ƒ²¥Æº‰Õ¢"±~•‰E¦B”ë}«"Ò,Â_Å:?âÁ¬"Q°ÞÕ® G³—5µl 1o)§?bóîf–ca =±Ö¶ìXŽîbX-ù2V‡Ü°ÝuY©&´´-´ÚHµéæ.†ug‡8€jÁ:ß±Ð?®Xó9ø%,.¬V§ˆbýâ‡Ø› …`=‹3ê²æžHTX.?0h¬Àrq×eõR6,‡ áËêÓXzÙ;‰Ëj

woran liegt das Es kommt keine Fehlermeldung

Dank euch

Gruß Tobi
 
Zeig mal ein bisschen Code. Also wie du das PNG erstellt hast und wie du es an den Client sendest...

MFG
redX
 
Hallo ich nutze die Klasse CPaint da ist schon alles vorgefertigt. Ich hab das von hier :
http://www.phpwelt.de/archiv/arclink.php?arcid=1042&was=dlurl

<?
require("CDiagramm.php");

$oDiagramm->toFile("/tmp/test1.png");
$oDiagramm->show();
?>

Datei: CDDiagramm.php

var $m_img;
var $m_img_type = "notSet";

function show()
{
if ($this->m_img_type=="PNG") imagepng($this->m_img);
if ($this->m_img_type=="GIF") imagegif($this->m_img);
if ($this->m_img_type=="notSet") $this->noType();
}

function toFile($filename)
{
if ($this->m_img_type=="PNG") imagepng($this->m_img,$filename);
else if ($this->m_img_type=="notSet") $this->noType();
else echo "Sorry not implemented<BR>";
}
 
ehm... *hüstel* hey, wie ich versprochen hab! kein Quelltext mehr ;-)

ändere mal noch in der CDDiagram folgendes:

var $m_img_type = "notSet";

in

var $m_img_type = "PNG";
 
Zurück