我的一亩三分地 我就喜欢!
13fen  设为主页
 收藏本站
 
当前位置: > 一亩三分地:首页 > 网络学院 > 网络编程 > PHP专区 > php安装/入门 > 图象翻转
热门文章排行
热门文章排行 检查email地址格式的代码(01-11)
PHP操作文件问答(01-11)
PHP安装攻略:安装并配置PHP(10-23)
PHP的十个高级技巧 4(10-23)
PHP控制语句(10-12)
精采文章排行
精采文章排行 PHP连接MYSQL的两种方法(11-15)
PHP和MySQL开发的8个技巧(10-23)
PHP安装攻略:安装并配置PHP(10-23)
php+mysql扎实个人基本功(10-23)
PHP编程常用技巧四则(10-23)
技术专题推荐
网管论坛交流
 

图象翻转 

作者:佚名   来源:本站教程   点击:   日期:2007-01-11

<?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);
?>



文章评论】 【收藏本文】 【推荐好友】 【打印本文】 【论坛讨论

   相关文章:
·将OICQ数据转成MYSQL数据 ·用PHP实现ODBC数据分页显示一例
·php生成WAP页面 ·PHP与Javascript的两种交互方式
·PHP+Javascript模拟Matrix画面 ·WHOIS类的修改版

   文章评论:(条)
  
 请留名: 匿名评论   点击查看所有评论 网管论坛
 

  责任编辑:一分  声明:刊登此文章是为了传递更多信息,文章内容仅供参考,转载请注明出处。