Whenever I try to create an Image either from another Image or directly using the GD Library it results in errornous image code.
Even when just opening an image and then displaying it with the imagepng() function results in nothing that could be used:
‰PNG IHDRºq¤PLTEÿâ 7*IDATxœíÁ1 õOío €7O°9—xIEND®B`‚
That is the result of :
<?php
$im = imagecreatefrompng("test.png");
imagepng($im);
imagedestroy($im);
?>
Yes I defined the meta type in the header.
I'm using PHP5 running as an Apache 2 module with the gd2 library as extension.
phpinfo() sais this:
gd
GD Support enabled
GD Version bundled (2.0.28 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.1.9
T1Lib Support enabled
GIF Read Support enabled
GIF Create Support enabled
JPG Support enabled
PNG Support enabled
WBMP Support enabled
XBM Support enabled
The browsers used to test this are : Firefox 1.5.0.6 and IE 6
Interesting to note though is that it saves the image right when its selected to save it to a file and then display it. But just displaying it results in the error.
Ok then if anyone can help me I'll be very glad = )
If you need any additional information feel free to ask