1
我想旋转图像,但我似乎无法保持图像本身。旋转PNG图像,并保持透明背景
这是我有:
// Content type
header('Content-type: image/png');
$image = 'http://mapning.com/img/plane.png';
$file = imagecreatefrompng($image);
// Rotate
$rotate = imagerotate($file, $angle, 0);
// Output
imagepng($rotate);
我在做什么错?
好的,这似乎工作一点。现在角落是黑色的,我找到了一个解决方案,但这不断给我围绕原始图像的黑线。 – 2011-05-09 17:50:25
@RenePot雷内,你有没有设法摆脱这些黑线?如果是的话,你是怎么做到的? – 2012-11-22 11:34:11
@AndreiOniga对不起,我不记得,我不认为我已经得到了代码 – 2012-11-22 11:57:27