How to rotate an image with PHP, any degree, without having the filled space? For instance, if I rotate an image 10 degrees, the image rotates fine but the container around (square) gets filled with black. Is it possible to get rid of this, when for example merging 2 images?
Share
You can set the background color in imagerotate as the third parameter.
I’m not quite sure what you are asking for otherwise. If you rotate an image, it has to remain a rectangle parallel to the axises. Therefore the image “container” is resized to fit the now rotated image.