zoukankan      html  css  js  c++  java
  • 制作验证码使用到的函数

    imagefilledrectangle()
    imagefilledrectangle() 函数画一矩形并填充。
    语法:
    bool imagefilledrectangle( resource image, int x1, int y1, int x2, int y2, int color )
    x1,y1为左上角左边,x2,y2为右下角坐标。


    ImageTTFText

    写 TTF 文字到图中。
    语法: array ImageTTFText(int im, int size, int angle, int x, int y, int col, string fontfile, string text);
    返回值: 数组



    imagecreatetruecolor

    (PHP 4 >= 4.0.6, PHP 5)

    imagecreatetruecolor — 新建一个真彩色图像
    说明
    resource imagecreatetruecolor ( int $width , int $height )

    imagecreatetruecolor() 返回一个图像标识符,代表了一幅大小为 x_size 和 y_size 的黑色图像。



    imagecolorallocate — 为一幅图像分配颜色
    说明
    int imagecolorallocate ( resource $image , int $red , int $green , int $blue )

    imagecolorallocate() 返回一个标识符,代表了由给定的 RGB 成分组成的颜色。red,green 和 blue 分别是所需要的颜色的红,绿,蓝成分。这些参数是 0 到 255 的整数或者十六进制的 0x00 到 0xFF。imagecolorallocate() 必须被调用以创建每一种用在 image 所代表的图像中的颜色。

  • 相关阅读:
    写日志
    读写excel
    python安装模块
    数据库
    日志和关键字查找
    时间戳
    os 模块
    图-最小生成树算法之Kruskal及其Java实现
    图-图的表示、搜索算法及其Java实现
    前端实现list排序
  • 原文地址:https://www.cnblogs.com/jacson/p/4240091.html
Copyright © 2011-2022 走看看