Class Image

Description

图像操作类库

Located in /ORG/Util/Image.class.php (line 24)

Base
   |
   --Image
Method Summary
static string buildImageVerify ([string $length = 4], [string $mode = 1], [string $type = 'png'], [string $width = 48], [string $height = 22], [ $verifyName = 'verify'])
static void GBVerify ([ $length = 4], [ $type = 'png'], [ $width = 180], [ $height = 50], [ $fontface = 'simhei.ttf'], [ $verifyName = 'verify'])
static mixed getImageInfo ( $img, string $image)
static void output ( $im, [ $type = 'png'])
static string showAdvVerify ([string $type = 'png'], [string $width = 180], [string $height = 40])
static string showASCIIImg (string $image, [ $string = ''], [string $type = ''])
static void showImg (string $imgFile, [string $text = ''], [string $width = 80], [string $height = 30])
static void thumb (string $image, [string $type = ''], [string $filename = ''], [string $maxWidth = 200], [string $maxHeight = 50], [boolean $interlace = true], [ $suffix = '_thumb'], string $position)
static string UPCA ( $code, [string $type = 'png'], [string $lw = 2], [string $hi = 100])
Methods
static buildImageVerify (line 202)

生成图像验证码

  • throws: ThinkExecption
  • access: public
static string buildImageVerify ([string $length = 4], [string $mode = 1], [string $type = 'png'], [string $width = 48], [string $height = 22], [ $verifyName = 'verify'])
  • string $length: 位数
  • string $mode: 类型
  • string $type: 图像格式
  • string $width: 宽度
  • string $height: 高度
  • $verifyName
static GBVerify (line 239)
static void GBVerify ([ $length = 4], [ $type = 'png'], [ $width = 180], [ $height = 50], [ $fontface = 'simhei.ttf'], [ $verifyName = 'verify'])
  • $length
  • $type
  • $width
  • $height
  • $fontface
  • $verifyName
static getImageInfo (line 40)

取得图像信息

  • access: public
static mixed getImageInfo ( $img, string $image)
  • string $image: 图像文件名
  • $img
static output (line 430)
static void output ( $im, [ $type = 'png'])
  • $im
  • $type
static showAdvVerify (line 329)

生成高级图像验证码

  • throws: ThinkExecption
  • access: public
static string showAdvVerify ([string $type = 'png'], [string $width = 180], [string $height = 40])
  • string $type: 图像格式
  • string $width: 宽度
  • string $height: 高度
static showASCIIImg (line 283)

把图像转换成字符显示

  • throws: ThinkExecption
  • access: public
static string showASCIIImg (string $image, [ $string = ''], [string $type = ''])
  • string $image: 要显示的图像
  • string $type: 图像类型,默认自动获取
  • $string
static showImg (line 74)

显示服务器图像文件

支持URL方式

  • access: public
static void showImg (string $imgFile, [string $text = ''], [string $width = 80], [string $height = 30])
  • string $imgFile: 图像文件名
  • string $text: 文字字符串
  • string $width: 图像宽度
  • string $height: 图像高度
static thumb (line 126)

生成缩略图

  • throws: ThinkExecption
  • access: public
static void thumb (string $image, [string $type = ''], [string $filename = ''], [string $maxWidth = 200], [string $maxHeight = 50], [boolean $interlace = true], [ $suffix = '_thumb'], string $position)
  • string $image: 原图
  • string $type: 图像格式
  • string $filename: 缩略图文件名
  • string $maxWidth: 宽度
  • string $maxHeight: 高度
  • string $position: 缩略图保存目录
  • boolean $interlace: 启用隔行扫描
  • $suffix
static UPCA (line 377)

生成UPC-A条形码

  • throws: ThinkExecption
static string UPCA ( $code, [string $type = 'png'], [string $lw = 2], [string $hi = 100])
  • string $type: 图像格式
  • string $lw: 单元宽度
  • string $hi: 条码高度
  • $code

Documentation generated on Thu, 27 Mar 2008 08:20:45 +0000 by 塞北的雪