generate png image using php

To create image using php you can use below code

$img = imagecreatetruecolor(200, 200);
imagesavealpha($img, true);
$color = imagecolorallocatealpha($img, 0, 0, 0, 127);
imagefill($img, 0, 0, $color);
imagepng($img, 'test.png');

Tags: Magento1,

No comments

Leave a Reply

Your email address will not be published. Required fields are marked *