php可以做图片的镜象翻转吗? CSS就好了<img src="http://community.csdn.net/images/CSDN_logo.GIF" style="filter : progid:DXImageTransform.Microsoft.BasicImage(mirror=1) "> 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 imagerotate(PHP 4 >= 4.3.0, PHP 5)imagerotate -- 用给定角度旋转图像说明resource imagerotate ( resource src_im, float angle, int bgd_color)将 src_im 图像用给定的 angle 角度旋转。bgd_color 指定了旋转后没有覆盖到的部分的颜色。 http://blog.csdn.net/ezdevelop/archive/2004/07/03/32933.aspx <?php$image = "images/csdn.gif"; // 原图$imgstream = file_get_contents($image);$im = imagecreatefromstring($imgstream);$thumbw = imagesx($im); // 原图宽$thumbh = imagesy($im); // 原图高if(function_exists("imagecreatetruecolor")) $dim = imagecreatetruecolor($thumbw, $thumbh); // 创建目标图gd2else $dim = imagecreate($thumbh, $thumbw); // 创建目标图gd1for($x=0;$x<$thumbw;$x++) for($y=0;$y<$thumbh;$y++) {// imagecopyresized($dim,$im,$thumbw-$x-1,$y,$x,$y,1,1,1,1); //水平翻转 imagecopyresized($dim,$im,$x,$thumbh-$y-1,$x,$y,1,1,1,1); //垂直翻转 }header ("Content-type: image/jpeg");imagejpeg ($dim);?> 如何使用weboffice服务器上传功能? 网站开发文档 指定值的获取,高手帮忙下!! 这个js调用方法怎么看啊?看糊涂了 我的网站被恶意攻击了 数组提交问题——在线等! 如何安装和设置smarty,请大家指导一下! 寻求php的高手 session和cookie的超级奇怪问题! 请教网页图像保密的解决方案 linux 下PHP 安装的问题 TMD,从今往后不来csdn了,问问题从来没有得到答案!!!
(PHP 4 >= 4.3.0, PHP 5)imagerotate -- 用给定角度旋转图像
说明
resource imagerotate ( resource src_im, float angle, int bgd_color)
将 src_im 图像用给定的 angle 角度旋转。bgd_color 指定了旋转后没有覆盖到的部分的颜色。
$image = "images/csdn.gif"; // 原图
$imgstream = file_get_contents($image);
$im = imagecreatefromstring($imgstream);$thumbw = imagesx($im); // 原图宽
$thumbh = imagesy($im); // 原图高if(function_exists("imagecreatetruecolor"))
$dim = imagecreatetruecolor($thumbw, $thumbh); // 创建目标图gd2
else
$dim = imagecreate($thumbh, $thumbw); // 创建目标图gd1
for($x=0;$x<$thumbw;$x++)
for($y=0;$y<$thumbh;$y++) {
// imagecopyresized($dim,$im,$thumbw-$x-1,$y,$x,$y,1,1,1,1); //水平翻转
imagecopyresized($dim,$im,$x,$thumbh-$y-1,$x,$y,1,1,1,1); //垂直翻转
}
header ("Content-type: image/jpeg");
imagejpeg ($dim);
?>