PHP GD How to circular crop 3 square images and merge into 1 image maintaining transparency
I have 2 source images and I want to: Do a circular crop of each image, with the outside of the circle transparent Merge/copy all images back onto a destination transparent image. I have tried many examples , but can't seem to maintain transparency on the final image. I'm trying to achieve something like this: This is an example of the output I am getting: Here's my circle_crop function: function create_circle( $img_path ) { // Attribution: by NerdsOfTech // Step 1 - Start with image as layer 1 (canvas). if (! $img1 = $this->imageCreateFromAny( $img_path )) { return FALSE; } $x=imagesx($img1);