Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Save image created from function imagecopy

Tags:

php

image

resize

When I create image from this:

imagecopy($im, $stamp, imagesx($im) - $sx - $marge_right, imagesy($im) - $sy - $marge_bottom, 0, 0, imagesx($stamp), imagesy($stamp));

I can output it like this:

header('Content-type: image/png');

But how can I save it?

like image 987
josaric Avatar asked Dec 01 '25 02:12

josaric


1 Answers

You can use below code to save the image.

imagepng($imagename, $mapimage_path  , 0);
like image 114
Amit Avatar answered Dec 03 '25 19:12

Amit