I am having hard time with php headers, i'm trying to create any kind of image in my browser without saving it in a file, but no matter what i do i can't get it working.
So for example if i use this basic example from php manual:
$im = imagecreate(100, 100);
header('Content-Type: image/png');
imagepng($im);
imagedestroy($im);
It would set correct header and even output that icon which u get when image is not found.
Also i use xampp
which have GD enabled, here is my phpinfo
GD part:
GD Support enabled
GD Version bundled (2.0.34 compatible)
FreeType Support enabled
FreeType Linkage with freetype
FreeType Version 2.4.3
GIF Read Support enabled
GIF Create Support enabled
JPEG Support enabled
libJPEG Version 6b
PNG Support enabled
libPNG Version 1.2.46
WBMP Support enabled
XBM Support enabled
Is my code is wrong or do i need to configure something?
You should not only create the image but also fill it some way: