|
![]() |
名片设计 CorelDRAW Illustrator AuotoCAD Painter 其他软件 Photoshop Fireworks Flash |
|
<?php /** flip 图象翻转 **/ $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); ?> 返回类别: 教程 上一教程: 关于Zend Optimizer 下一教程: 用Pear加速PHP程序开发 您可以阅读与"图象翻转"相关的教程: · 一个全面获取图象信息的函数getImageInfo() · 用PHP创建并处理图象 · 不用GD库生成当前时间的PNG格式图象的程序 · 用PHP实现把图象上传到数据库 · 不用GD库生成当前时间的PNG格式图象的程序 |
![]() ![]() |
快精灵印艺坊 版权所有 |
首页![]() ![]() ![]() ![]() ![]() ![]() ![]() |