I use an extern script to manipulate pictures from my forum.
I get a picture with curl.
Now i need to change the script to use GD instead of ImageMagick.
These are the parts i have to exchange (there is more code, but not neccessary to show here)
Has someone an idea or a site with examples, how i can exchange this imgaeMagick-code to GD, please?
I need to create an image from the file ($newFile); i need to "thumbnail it", i need to save it.
I get a picture with curl.
Now i need to change the script to use GD instead of ImageMagick.
These are the parts i have to exchange (there is more code, but not neccessary to show here)
Code:
$i = new \Imagick();
$i->readImage($newFile);
// crop the image
... more code ...
// thumbnail the image
$i->ThumbnailImage($width,$height,true);
$i->writeImage($newFile);
Has someone an idea or a site with examples, how i can exchange this imgaeMagick-code to GD, please?
I need to create an image from the file ($newFile); i need to "thumbnail it", i need to save it.