php入门教程七(图片操作与实例)

 更新时间:2016年11月25日 15:10  点击:2039

本文章利用用大量的例子来讲解php教程代码对图片操作的讲解。下面来看看一个个实例教程吧.

<?php
$height = 300;
$width = 300;
//创建背景图
$im = imagecreatetruecolor($width, $height);
//分配颜色
$white = imagecolorallocate ($im, 255, 255, 255);
$blue = imagecolorallocate ($im, 0, 0, 64);
//绘制颜色至图像中
imagefill($im, 0, 0, $blue);
//绘制字符串:hello,php
imagestring($im, 10, 100, 120, 'hello,php', $white);
//输出图像,定义头
header ('content-type: image/png');
//将图像发送至浏览器
imagepng($im);
//清除资源
imagedestroy($im);
?>

实例二生成缩略图片

<?php
header("content-type: image/jpeg");
// 载入图像
$imagen1 = imagecreatefromjpeg("imagen1.jpg");
$imagen2 = imagecreatefromjpeg("imagen2.jpg");

// 复制图像
imagecopy($imagen1,$imagen2,0,0,0,0,200,150);

// 输出jpeg图像
imagejpeg($imagen1);

//释放内存
imagedestroy($imagen2);
imagedestroy($imagen1);

?>

获取图片大小信息

<?php
$info = getimagesize("imagen2.jpg");
print_r($info);

?>

绘制png图片

<?php
//png格式图像处理函数
function loadpng ($imgname) {
    $im = @imagecreatefrompng ($imgname);
    if (!$im) {    //载入图像失败                     
        $im = imagecreate (400, 30);     
        $bgc = imagecolorallocate ($im, 255, 255, 255);
        $tc  = imagecolorallocate ($im, 0, 0, 0);
       imagefilledrectangle ($im, 0, 0, 150, 30, $bgc);
       imagestring($im, 4, 5, 5, "error loading: $imgname", $tc);
    }
    return $im;
 }
 $imgpng=loadpng("./karte.png");
   /* 输出图像到浏览器 */
 header("content-type: image/png");
 imagepng($imgpng);
 ?>


给图片加文字

<?php
  //创建 100*30 图像
  $im = imagecreate(100, 30);
  // white background and blue text
  $bg = imagecolorallocate($im, 200, 200, 200);
  $textcolor = imagecolorallocate($im, 0, 0, 255);
 
  // write the string at the top left
  imagestring($im, 5, 0, 0, "hello world!", $textcolor);
 
  // output the image
header ("content-type: image/jpeg");
imagejpeg ($im);
imagedestroy($im);

?>

主要是购物车部分代码的讲解,和对session操作的php教程代码演示。

<?php
//
// add_item.php:
//  add an item to the shopping cart.
//
session_start();
if (session_is_registered('cart')) {
    session_register('cart');
}

require 'lib.inc.php'; // loadproducts()

loadproducts(); // load products in $master_products_list

// make $curr_product global
$curr_product = array();

// loop through all the products and pull up the product
// that we are interested in

 

foreach ($master_products_list as $prod_id => $product) {
    if (trim($prod_id) == trim($_get[id])) {
        $curr_product = $product;
    }
}


// register our session
//session_register('cart');
//if(session_is_registered('cart')) echo "已经注册";

 

if ($_post[ordered]) {  // if they have chosen the product

    array_push($_session[cart][products], array(trim($_post[id]), $_post[quantity]));
    $_session[cart][num_items] += $_post[quantity];
 
}
?>

<html>
<head>
    <title>
    <?php if ($_post[ordered]) {  ?>
        已经添加 <?php echo $curr_product[name]; ?> 到您的购物篮
    <?php } else {  ?>
        添加 <?php echo $curr_product[name]; ?> 到您的购物篮
    <?php } ?>
    </title>
</head>
<body>
<?php if ($_post[ordered]) {  ?>
    <h1><?php echo $curr_product[name]; ?>
        添加至购物篮成功</h1>

    <a href="cart.php">返回</a> 商品列表页面.
<?php }  else {  ?>
    <h1>添加 <?php echo $curr_product[name]; ?> 到您的购物篮</h1>

    <form action="<?php echo $php_self; ?>" method="post">
    商品名称: <?php echo $curr_product[name]; ?>
    <br>
    商品说明: <?php echo $curr_product[desc]; ?>
    <br>
    商品单价: rmb<?php echo $curr_product[price]; ?>
    <br>
    商品数量: <input type="text" size="7" name="quantity">
    <input type="hidden" name="id" value="<?php echo $_get[id]; ?>">
    <input type="hidden" name="ordered" value="1">

    <input type="submit" value="添加至购物栏">
    </form>
<?php } ?>
</body>
</html>


php代码

<?php
//
// cart.php:  the main file
//
session_start();

require 'lib.inc.php';
//判断购物篮会话变量cart是否注册,不注册则注册cart变量
if (session_is_registered('cart')) {
    session_register('cart');
}


// 如果购物篮没有初始化,则初始化购物篮
if (!isset($_session[cart][num_items])) {
    $_session[cart] = array("num_items" => 0,
                  "products"  => array());
}


// from site_lib.inc, loads the $master_products_list array
loadproducts(); //载入物品列表
?>

<html>
<head>
    <title>演示会话跟踪的购物篮程序</title>
</head>

<body>

<h1>欢迎进入网上商店</h1>

<?php
if ($_session[cart][num_items]) {  // if there is something to show
?>
<h2>当前在购物篮里的物品</h2>
<br>
<table border="2" cellpadding="5" cellspacing="2">
<tr>
    <th>
        商品名称
    </th>
    <th>
        商品说明
    </th>
    <th>
        单价
    </th>
    <th>
        数量
    </th>
    <th>
        &nbsp;
    </th>
</tr>
<?php
  
    // loop through the products
    foreach ($_session[cart][products] as $i => $product) {
        $product_id = $product[0];
        $quantity   = $product[1];

        $total += $quantity *
                  (double)$master_products_list[$product_id][price];
?>
<tr>
    <td>
        <?php echo $master_products_list[$product_id][name]; ?>
    </td>
    <td>
        <?php echo $master_products_list[$product_id][desc]; ?>
    </td>
    <td>
        <?php echo $master_products_list[$product_id][price]; ?>
    </td>
    <td>
        <form action="change_quant.php" method="post">
        <input type="hidden" name="id" value="<?php echo $i; ?>">
        <input type="text" size="3" name="quantity"
                value="<?php echo $quantity; ?>">
    </td>
    <td>
        <input type="submit" value="数量更改">
        </form>
    </td>
</tr>
<?php
    }
?>
<tr>
    <td colspan="2" align="right">
       <b>合计: </b>
    </td>
    <td colspan="2">
        rmb:<?php echo $total; ?>
    </td>
 <td>&nbsp;</td>
</tr>
</table>
<br>
<br>
<?php
}
?>

<h2>商店待出售的商品</h2>
<br>
<i>
    我们提供以下商品待售:
</i>
<br>
<table border="2" cellpadding="5" cellspacing="2">
<tr>
    <th>
        商品名称
    </th>
    <th>
        商品说明
    </th>
    <th>
        单价
    </th>
    <th>
        &nbsp;
    </th>
</tr>
<?php
    // show all of the products
    foreach ($master_products_list as $product_id => $item) {
?>
<tr>
    <td>
        <?php echo $item[name]; ?>
    </td>
    <td>
        <?php echo $item[desc]; ?>
    </td>
    <td>
        $<?php echo $item[price]; ?>
    </td>
    <td>
        <a href="add_item.php?id=<?php echo $product_id; ?>">
            添加至购物篮
        </a>
    </td>
</tr>
<?php
    }

?>
</table>

购物车

<?php
//
// change_quant.php:
//   change the quantity of an item in the shopping cart.
//
session_start();
if (session_is_registered('cart')) {
    session_register('cart');
}

// typecast to int, making sure we access the
// right element below
$i = (int)$_post[id];

// save the old number of products for display
// and arithmetic
$old_num = $_session[cart][products][$i][1];

if ($_post[quantity]) {
    $_session[cart][products][$i][1] = $_post[quantity]; //change the quantity
} else {
    unset($_session[cart][products][$i]); // send the product into oblivion
}

// update the number of items
$_session[cart][num_items] = ($old_num >$_post[quantity]) ?
                   $_session[cart][num_items] - ($old_num-$_post[quantity]) :
                   $_session[cart][num_items] + ($_post[quantity]-$old_num);
?>

<html>
<head>
    <title>
        数量修改
    </title>
</head>
<body>
    <h1> 将数量: <?php echo $old_num; ?> 更改为
         <?php echo $_post[quantity]; ?></h1>
    <a href="cart.php">返回</a> 商品列表页面.
</body>
</html>

打开文件

<?php
//物品数组
$master_products_list = array();


//载入物品数据函数
function loadproducts() {
    global $master_products_list;
    $filename = 'products.txt';

    $fp = @fopen($filename, "r")
        or die("打开 $filename 文件失败");
    @flock($fp, 1)
        or die("锁定 $filename 文件失败");

    //读取文件内容
    while ($line = fgets($fp, 1024)) {
        list($id, $name, $desc, $price) = explode('|', $line); //读取每行数据,数据以| 格开
        $id = trim($id); //去掉首尾特殊符号
        $master_products_list[$id] = array("name" =>  $name, //名称
                                           "desc" =>  $desc, //说明
                                           "price" => $price); //单价
    }

    @fclose($fp)  //关闭文件
        or die("关闭 $filename 文件失败");
}
?>

本款教程主要是讲对数据库操作的php代码范例,有php操作mysql数据连接,以及删除数据,查询数据 修改数据,修改更新记录等实例。

简单查询数据

 代码如下 复制代码

<?php
//连接数据库
$link_id = mysql_connect("localhost","root","") or die("连接失败");
if($link_id)
{
 //选择数据库
 mysql_select_db("my_test");
 //以上为头部数据库连接部分,为以下公用的部分。
 if(!$_get[id]){

  //显示用户列表
  $sql = "select * from userinfo";
  $result=mysql_query($sql);
  
  echo "<table border=1>
    <tr>
     <td>编号</td>
     <td>用户名称</td>
     <td>性别</td>
     <td>年龄</td>
     <td>注册时间</td>
     <td>详细信息</td>
    </tr>";

 

  while($row=mysql_fetch_array($result)){
   echo "<tr>
     <td>".$row[id]."</td>
     <td>".$row[username]."www.111cn.net</td>
     <td>".$row[gender]."</td>
     <td>".$row[age]."</td>
     <td>".$row[regdate]."</td>
     <td><a href=query.php?id=".$row[id].">查看</a></td>
    </tr>";
  }
  echo "</table>";
 }
 else
 {  
  //显示指定用户的详细信息
  $sql="select * from userinfo where id=".$_get[id];
  $result=mysql_query($sql);
  $row=mysql_fetch_array($result);
  echo "编号:".$row[id]."<br>用户名:".$row[username]."<br>性别:".$row[gender]."<br>年龄:".$row[age]."<br>注册时间:".$row['regdate'];

  echo "<br><br><br><a href=query.php>继续查询</a>";
 }
}//end if
?>

删除数据

 代码如下 复制代码

<?php
//连接数据库
$link_id = mysql_connect("localhost","root","") or die("连接失败");
if($link_id)
{
 mysql_select_db("my_test");
 if(!$_get[id])
 {

  $result=mysql_query("select * from userinfo");
  echo "<table border=1>
    <tr>
     <td>编号</td>
     <td>用户名称www.111cn.net</td>
     <td>性别</td>
     <td>年龄</td>
     <td>注册时间</td>
     <td>操作</td>
    </tr>";

 

  while($row=mysql_fetch_array($result)){
   echo "<tr>
     <td>".$row[id]."</td>
     <td>".$row[username]."</td>
     <td>".$row[gender]."</td>
     <td>".$row[age]."</td>
     <td>".$row[regdate]."</td>
     <td><a href=delete.php?id=".$row[id].">删除</a></td>
    </tr>";
  }
  echo "</table>";

 }//显示列表的内容
 else
 {

   $sql="delete from userinfo where id=".$_get[id];
   $result=mysql_query($sql);
   if($result)
    echo "记录已经成功删除<br><a href='delete.php'>返回</a>";
   else
    echo "记录删除失败<br><a href=delete.php.php?id=".$_get[id].">返回</a>";

 }//else($id部分)
} // end if
?>

修改,更新记录

 代码如下 复制代码

<?php
//连接数据库
$link_id = mysql_connect("localhost","root","") or die("连接失败");
if($link_id)
{
 mysql_select_db("my_test");
 if(!$_get[id])
 {

  $result=mysql_query("select * from userinfo");
  echo "<table border=1>
    <tr>
     <td>编号</td>
     <td>用户名称</td>
     <td>性别</td>
     <td>年龄</td>
     <td>注册时间</td>
     <td>操作</td>
    </tr>";

 

  while($row=mysql_fetch_array($result)){
   echo "<tr>
     <td>".$row[id]."</td>
     <td>".$row[username]."</td>
     <td>".$row[gender]."</td>
     <td>".$row[age]."</td>
     <td>".$row[regdate]."</td>
     <td><a href=modify.php?id=".$row[id].">编辑</a></td>
    </tr>";
  }
  echo "</table>";

 }//显示列表的内容
 else
 {
  if(!$_post[ok])
  {
   $sql="select * from userinfo where id=".$_get[id];
   $result=mysql_query($sql);
   $row=mysql_fetch_array($result);
   ?>
   <form method=post action='modify.php?id=<? echo $_get[id];?>'>
   <?
   echo $row[id]."<br>"; 
   ?>
   <input type="hidden" name="id" value=<?echo $row[id];?>>
   姓名 www.aimeige.com.cn<input type=text name="username" value=<?echo $row[username];?>><br>
   性别 <input type=text name="gender" value=<?echo $row[gender];?>><br>
   年龄 <input type=text name="age"   value=<?echo $row[age];?>><br>
   注册时间 <input type=text name="regdate"   value=<?echo $row['regdate'];?>><br>
   <input type=submit name=ok value="提交">
   </form>
   <?
  }// if(!$_post[ok])
  else{//针对$ok被激活后的处理:
   
   $sql="update userinfo set username='".$_post[username]."',gender='".$_post[gender]."',age='".$_post[age]."',regdate='".$_post[regdate]."' where id='".$_post[id]."'";
   $result=mysql_query($sql);
   if($result)
    echo "记录已经成功修改<br><a href='modify.php'>继续修改记录</a>";
   else
    echo "记录修改失败<br><a href=modify.php?id=".$_post[id].">返回</a>";
  }
 }//else($id部分)
} // end if
?>

保存记录到数据库

 代码如下 复制代码

<?php
if($_post[ok])
{
 $link_id = mysql_connect("localhost","root","") or die("连接失败");
 if($link_id)
 {
  //选择数据库
  mysql_select_db("my_test");
  //插入数据sql语句
  $sql="insert into userinfo values('".$_post[id]."','".$_post[name]."','".$_post[gender]."','".$_post[age]."','".$_post[regdate]."')";
  //执行sql语句
  $result=mysql_query($sql);
  if($result)
  {
   echo "记录已经成功插入<br><a href='insert.php'>继续插入记录</a>";
  }
  else
   echo "执行插入sql语句失败";
  //关闭数据库
  mysql_close($link_id);
 }
}
else
{
 ?>
 <form method=post action=insert.php>
 编号<input type=text name="id"><br>
 姓名<input type=text name="name"><br>
 性别<input type=text name="gender" ><br>
 年龄<input type=text name="age"><br>
 注册时间<input type=text name="regdate"><br>
 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
 <input type=submit name=ok value="提交">
 </form>
 <?
}//end if
?>

根据上面的实例我们总结了,本文章主要是讲到imap服务器连接以及与ftp服务器进行连接详细教程,包括删除,上传,下载文件实例

用php教程实现连接服务器,还有实现连接imap服务器,最后通过php编写的代码来实现上传和下载文件

 代码如下 复制代码

<?php
//连接 imap 服务器链接,imap 的端口为 143。
$mbox = imap_open("{localhost:143}inbox","user_id","password");
//连接pop3 服务器链接,pop3 的端口为 110。
$mbox = imap_open("{localhost/pop3:110}inbox","user_id","password");
//连接nntp 服务器链接,nntp 的端口为 119。
$nntp = imap_open("{localhost/nntp:119}comp.test","","");
?>


邮件发送函数mail

 代码如下 复制代码
<?php
mail( "163@111cn.net", "欢迎你", "hello,你好! " );
?>
 代码如下 复制代码
<?php
//连接imap服务器
$mbox = imap_open("{imap.example.org}", "username", "password", op_halfopen)
      or die("连接失败: " . imap_last_error());
$list = imap_getmailboxes($mbox, "{imap.example.org}", "*");
if (is_array($list)) {
    foreach ($list as $key => $val) {
        echo "($key) ";
        echo imap_utf7_decode($val->name) . ",";
        echo "'" . $val->delimiter . "',";
        echo $val->attributes . "<br />n";
    }
} else {
    echo "imap_getmailboxes 失败: " . imap_last_error() . "n";
}
//关闭imap连接
imap_close($mbox);
?>

连接ftp服务器

 代码如下 复制代码

<?php
// 打开将要上传的文件
$file = 'demofile.txt';
$fp = fopen($file, 'r');

// 连接ftp服务器
$conn_id = ftp_connect($ftp_server);
//登陆ftp服务器
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);

// 上传文件
if(ftp_fput($conn_id, $file, $fp, ftp_ascii)) {
    echo "上传 $file 文件成功n";
} else {
    echo "上传 $file 文件失败n";
}

// 关闭ftp连接
ftp_close($conn_id);
//关闭打开的上传文件
fclose($fp);
?>

ftp文件上传下载功能

 代码如下 复制代码
<?php
$file = 'somefile.txt';
$remote_file = 'readme.txt';
// 连接ftp服务器
$conn_id = ftp_connect($ftp_server);
//使用用户名、密码登陆
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
//上传文件
if (ftp_put($conn_id, $remote_file, $file, ftp_ascii)) {
echo "成功上传 $file 文件n";
} else {
echo "上传 $file 文件失败n";
}
// 关闭ftp连接
ftp_close($conn_id);
?>

ftp删除文件

 代码如下 复制代码
<?php
$file = 'public_html/old.txt';
// 连接ftp服务器
$conn_id = ftp_connect($ftp_server);
// 验证用户名和密码
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
// 删除指定文件
if (ftp_delete($conn_id, $file)) {
echo "$file 文件删除成功 n";
} else {
echo "删除 $file 文件失败n";
}
// 关闭ftp连接
ftp_close($conn_id);
?>

ftp获取远程文件大小

 代码如下 复制代码
<?php
$file = 'somefile.txt';
// 连接ftp服务器
$conn_id = ftp_connect($ftp_server);
//验证用户名和密码
$login_result = ftp_login($conn_id, $ftp_user_name, $ftp_user_pass);
//获取指定文件的大小
$res = ftp_size($conn_id, $file);
if ($res != -1) {
    echo " $file 文件大小为 $res字节";
} else {
    echo "获取远程文件大小失败";
}
//关闭ftp连接
ftp_close($conn_id);
?> 

对文件访问实现的源代码。主要讲到php教程操作文件以及xml文档实例方法。

<?php
// 创建一个新的pdf文档句柄
$pdf = cpdf_open(0);
// 打开一个文件
cpdf_open_file($pdf);
// 开始一个新页面(a4)
cpdf_begin_page($pdf, 595, 842);
// 得到并使用字体对象
$arial = cpdf_findfont($pdf, "arial", "host", 1);
cpdf_setfont($pdf, $arial, 10);
// 输出文字
cpdf_show_xy($pdf, "this is an exam of pdf documents, it is a good lib,",50, 750);
cpdf_show_xy($pdf, "if you like,please try yourself!", 50, 730);
// 结束一页
cpdf_end_page($pdf);
// 关闭并保存文件
cpdf_close($pdf);

// 如果要直接输出到客户端的话,把下面的代码加上

$buf = cpdf_get_buffer($pdf);

$len = strlen($buf);

header("content-type: application/pdf");

header("content-length: $len");

header("content-disposition: inline; filename=pie_php.pdf");

print $buf;

cpdf_delete($pdf);
?>

xml文件

<?php
$dom = new domdocument();
$dom->load("order.xsl");
$proc = new xsltprocessor;
$xsl = $proc->importstylesheet($dom);

$xml = new domdocument();
$xml->load('order.xml');
$string = $proc->transformtoxml($xml);
echo $string;
?>

order.sls

<?xml version="1.0" encoding='gb2312' ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform">
<xsl:output encoding='gb2312'/>

  <xsl:param name="column" select="'sku'"/>
<xsl:param name="order" select="'ascending'"/>
  <xsl:template match="/">
    <html>
      <body>
        <xsl:apply-templates select="order">
          <xsl:with-param name="sortcolumn" select="$column" />
          <xsl:with-param name="sortorder" select="$order" />
        </xsl:apply-templates>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="order">
    <xsl:param name="sortcolumn" />
    <xsl:param name="sortorder" />
    <table border="1">
      <tr>
        <th>订单号</th>
        <th>id</th>
        <th>说明</th>
        <th>价格</th>
        <th>数量</th>
        <th>合计</th>
      </tr>
      <xsl:apply-templates select="item">        
      </xsl:apply-templates>
    </table>
  </xsl:template>
  <xsl:template match="item">
    <tr>
      <td><xsl:value-of select="../account" /></td>
      <td><xsl:value-of select="sku" /></td>
      <td><xsl:value-of select="description" /></td>
      <td><xsl:value-of select="priceper" /></td>
      <td><xsl:value-of select="quantity" /></td>
      <td><xsl:value-of select="subtotal" /></td>
    </tr>
  </xsl:template>    
</xsl:stylesheet>

order.xml文件

<?xml version="1.0" encoding='gb2312' ?>
<order>
  <account>9900234</account>
  <item id="1">
    <sku>1234</sku>
    <priceper>5.95</priceper>
    <quantity>100</quantity>
    <subtotal>595.00</subtotal>
    <description>www.111cn.net</description>
  </item>
  <item id="2">
    <sku>6234</sku>
    <priceper>22.00</priceper>
    <quantity>10</quantity>
    <subtotal>220.00</subtotal>
    <description>足球</description>
  </item>
  <item id="3">
    <sku>9982</sku>
    <priceper>2.50</priceper>
    <quantity>1000</quantity>
    <subtotal>2500.00</subtotal>
    <description>手机包</description>
  </item>
  <item id="4">
    <sku>3256</sku>
    <priceper>389.00</priceper>
    <quantity>1</quantity>
    <subtotal>389.00</subtotal>
    <description>手机</description>
  </item>
  <numberitems>www.111cn.net</numberitems>
  <total>3704.00</total>
  <orderdate>07/07/2002</orderdate>
  <ordernumber>8876</ordernumber>
</order>

 

 

[!--infotagslink--]

相关文章

  • 使用PHP+JavaScript将HTML页面转换为图片的实例分享

    这篇文章主要介绍了使用PHP+JavaScript将HTML元素转换为图片的实例分享,文后结果的截图只能体现出替换的字体,也不能说将静态页面转为图片可以加快加载,只是这种做法比较interesting XD需要的朋友可以参考下...2016-04-19
  • php抓取网站图片并保存的实现方法

    php如何实现抓取网页图片,相较于手动的粘贴复制,使用小程序要方便快捷多了,喜欢编程的人总会喜欢制作一些简单有用的小软件,最近就参考了网上一个php抓取图片代码,封装了一个php远程抓取图片的类,测试了一下,效果还不错分享...2015-10-30
  • C#从数据库读取图片并保存的两种方法

    这篇文章主要介绍了C#从数据库读取图片并保存的方法,帮助大家更好的理解和使用c#,感兴趣的朋友可以了解下...2021-01-16
  • Photoshop古装美女图片转为工笔画效果制作教程

    今天小编在这里就来给各位Photoshop的这一款软件的使用者们来说说把古装美女图片转为细腻的工笔画效果的制作教程,各位想知道方法的使用者们,那么下面就快来跟着小编一...2016-09-14
  • Python 图片转数组,二进制互转操作

    这篇文章主要介绍了Python 图片转数组,二进制互转操作,具有很好的参考价值,希望对大家有所帮助。一起跟随小编过来看看吧...2021-03-09
  • 轻松学习C#的基础入门

    轻松学习C#的基础入门,了解C#最基本的知识点,C#是一种简洁的,类型安全的一种完全面向对象的开发语言,是Microsoft专门基于.NET Framework平台开发的而量身定做的高级程序设计语言,需要的朋友可以参考下...2020-06-25
  • photoshop画斜线/直线/虚线的入门级教程

    这篇文章算是超级入门级别的了,我们下面来给各位介绍在photoshop画斜线/直线/虚线的教程了,希望下面这篇文章给你入门来帮助。 PS怎么画斜线 选择铅笔工具,或者画笔...2016-09-14
  • 利用JS实现点击按钮后图片自动切换的简单方法

    下面小编就为大家带来一篇利用JS实现点击按钮后图片自动切换的简单方法。小编觉得挺不错的,现在就分享给大家,也给大家做个参考。一起跟随小编过来看看吧...2016-10-25
  • jquery左右滚动焦点图banner图片鼠标经过显示上下页按钮

    jquery左右滚动焦点图banner图片鼠标经过显示上下页按钮...2013-10-13
  • js实现上传图片及时预览

    这篇文章主要为大家详细介绍了js实现上传图片及时预览的相关资料,具有一定的参考价值,感兴趣的朋友可以参考一下...2016-05-09
  • Photoshop枪战电影海报图片制作教程

    Photoshop的这一款软件小编相信很多的人都已经是使用过了吧,那么今天小编在这里就给大家带来了用Photoshop软件制作枪战电影海报的教程,想知道制作步骤的玩家们,那么下面...2016-09-14
  • Lua语言新手简单入门教程

    这篇文章主要给大家介绍的是关于Lua语言新手入门的简单教程,文中通过示例代码一步步介绍的非常详细,对各位新手们的入门提供了一个很方便的教程,需要的朋友可以参考借鉴,下面随着小编来一起学习学习吧。...2020-06-30
  • python opencv通过4坐标剪裁图片

    图片剪裁是常用的方法,那么如何通过4坐标剪裁图片,本文就详细的来介绍一下,感兴趣的小伙伴们可以参考一下...2021-06-04
  • 使用PHP下载CSS文件中的图片的代码

    共享一段使用PHP下载CSS文件中的图片的代码 复制代码 代码如下: <?php //note 设置PHP超时时间 set_time_limit(0); //note 取得样式文件内容 $styleFileContent = file_get_contents('images/style.css'); //not...2013-10-04
  • 微信小程序如何获取图片宽度与高度

    这篇文章主要给大家介绍了关于微信小程序如何获取图片宽度与高度的相关资料,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2021-03-10
  • PHP swfupload图片上传的实例代码

    PHP代码如下:复制代码 代码如下:if (isset($_FILES["Filedata"]) || !is_uploaded_file($_FILES["Filedata"]["tmp_name"]) || $_FILES["Filedata"]["error"] != 0) { $upload_file = $_FILES['Filedata']; $fil...2013-10-04
  • ps怎么制作图片阴影效果

    ps软件是现在很多人比较喜欢的,有着非常不错的使用效果,这次文章就给大家介绍下ps怎么制作图片阴影效果,还不知道制作方法的赶紧来看看。 ps图片阴影效果怎么做方法/...2017-07-06
  • C#中图片旋转和翻转(RotateFlipType)用法分析

    这篇文章主要介绍了C#中图片旋转和翻转(RotateFlipType)用法,实例分析了C#图片旋转及翻转Image.RotateFlip方法属性的常用设置技巧,需要的朋友可以参考下...2020-06-25
  • OpenCV如何去除图片中的阴影的实现

    这篇文章主要介绍了OpenCV如何去除图片中的阴影的实现,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧...2021-03-29
  • JavaScript 如何禁止用户保存图片

    这篇文章主要介绍了JavaScript 如何禁止用户保存图片,帮助大家完成需求,更好的理解和使用JavaScript,感兴趣的朋友可以了解下...2020-11-19