Over the past 2 days, I have been trying to add transversality to the background after rotating the image using the imagerotate () function of PHP-GD.
But, to my great disappointment, it does not work at all.
It just highlights the black background behind it.
Here is my code -
$ patchImageS = 'image.png'; // the image to be patched over the final bg
$ patchImage = imagecreatefrompng ($ patchImageS); // resource of image to be patched
$ patchImage = imagerotate ($ patchImage, 23, 0, 0);
imagepng ($ patchImage, 'tt.png');
I tried to change the passed parameters in the function
imagerotate ($ patchImage, 23, 5, 0);
imagerotate ($ patchImage, 23, 0, 5);
Any help would be greatly appreciated.
source share