Here is my code:
$data = \'iVBORw0KGgoAAAANSUhEUgAAABwAAAASCAMAAAB/2U7WAAAABl\'
. \'BMVEUAAAD///+l2Z/dAAAASUlEQVR4XqWQUQoAIAxC2/0vXZDr\'
. \'EX4IJT
This is the correct syntax for imagepng
:
imagepng($im, "/path/where/you/want/save/the/png.png");
According to the PHP manual:
bool imagepng ( resource $image [, string $filename [, int $quality [, int $filters ]]] )
filename - The path to save the file to.
If not set or NULL, the raw image stream will be outputted directly.