IBOS open source
  • Namespace
  • Class

Namespaces

  • application
    • core
      • cache
        • driver
        • provider
      • components
      • controllers
      • engines
        • local
        • sae
      • model
      • modules
      • utils
      • widgets
    • modules
      • article
        • controllers
        • core
        • model
        • utils
      • calendar
        • controllers
        • model
        • utils
      • contact
        • controllers
        • model
        • utils
      • dashboard
        • controllers
        • model
        • utils
      • department
        • components
        • model
        • utils
      • diary
        • components
        • controllers
        • model
        • utils
        • widgets
      • email
        • controllers
        • core
        • model
        • utils
      • main
        • behaviors
        • components
        • controllers
        • model
        • utils
        • widgets
      • message
        • controllers
        • core
          • co
          • wx
            • callback
            • event
        • model
        • utils
      • mobile
        • components
        • controllers
        • utils
      • position
        • components
        • model
        • utils
      • recruit
        • components
        • controllers
        • core
        • model
        • utils
        • widgets
      • role
        • model
        • utils
      • user
        • components
        • controllers
        • model
        • utils
      • vote
        • components
        • controllers
        • model
        • utils
      • weibo
        • controllers
        • core
        • model
        • utils

Classes

  • Api
  • ApiCode
  • Attach
  • Cache
  • Cloud
  • Convert
  • Credit
  • Database
  • DateTime
  • Env
  • File
  • Ftp
  • IBOS
  • Image
  • Mail
  • Module
  • Org
  • Page
  • PHPExcel
  • String
  • System
  • Upgrade
  • Url
  • WebSite
  • Xml
  • XMLParse

Class Image

Namespace: application\core\utils
Copyright: Copyright © 2012-2013 IBOS Inc
Author: banyanCheung banyan@ibos.com.cn
Located at system/core/utils/Image.php

Methods summary

public static mixed
# getImageInfo( string $img )

取得图像信息

取得图像信息

Parameters

$img
$image 图像文件名

Returns

mixed
public static
# water( string $source, string $water, string $saveName = null, integer $pos = 0, string $alpha = 80, integer $quality = 100 )

为图片添加水印

为图片添加水印

Parameters

$source
原文件名
$water
水印图片
$saveName
添加水印后的图片名
$pos
位置,用九宫格表示
$alpha
水印的透明度
$quality
图片质量
public static
# thumb( string $image, string $thumbName, string $maxWidth = 200, string $maxHeight = 50, integer $quality = 100, string $type = '', boolean $interlace = true )

生成缩略图

生成缩略图

Parameters

$image
原图
$thumbName
缩略图文件名
$maxWidth
宽度
$maxHeight
高度
$quality
图像质量
$type
图像格式
$interlace
启用隔行扫描
public static
# thumb2( string $image, string $thumbname, string $type = '', string $maxWidth = 200, string $maxHeight = 50, boolean $interlace = true )

生成特定尺寸缩略图 解决原版缩略图不能满足特定尺寸的问题 PS:会裁掉图片不符合缩略图比例的部分

生成特定尺寸缩略图 解决原版缩略图不能满足特定尺寸的问题 PS:会裁掉图片不符合缩略图比例的部分

Parameters

$image
原图
$thumbname
$type 图像格式
$type
$thumbname 缩略图文件名
$maxWidth
宽度
$maxHeight
高度
$interlace
启用隔行扫描
public static
# waterMarkString( string $string, integer $size, string $source, string $saveName = null, integer $pos = 0, integer $quality = 100, array $rgb = array(), string $fontPath = '' )

根据给定的字符串生成水印

根据给定的字符串生成水印

Parameters

$string
字符串
$size
大小,像素表示
$source
原图位置
$saveName
保存的名称,如果为空将替换原图
$pos
水印的位置
$quality
生成图片的质量
$rgb
颜色值
$fontPath
字体路径
IBOS open source API documentation generated by ApiGen