Answer the question
In order to leave comments, you need to log in
How to rotate an image in PHP to an acute angle and have anti-aliasing at the edges?
Hello,
I have a task to rotate a png image by an angle of 2 degrees. But the edges when rotated by the imageRotate function are torn:
$dest = imagecreatefrompng($_SERVER['DOCUMENT_ROOT']."/images/female_big.png");
imagealphablending($dest, true);
imagesavealpha($dest, true);
$dest = imagerotate($dest, -2, IMG_COLOR_TRANSPARENT);
/*imagefilter ($dest, IMG_FILTER_SMOOTH, 100); - не помогает*/
imagepng($dest, "1.png");
Answer the question
In order to leave comments, you need to log in
So your link says that "GD uses very fast methods for all it's abilites without any actual smoothing or anything like that involved. If you want some proper image editing, you could either look into ImageMagick". Use Image Magic.
You can google something like "php image manipulation library" but things like that are slow in php. Most likely, all such libraries will work on top of gd or imagick.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question