PHP Class Qiniu\Processing\ImageUrlBuilder

Datei anzeigen Open project: qiniu/php-sdk Class Usage Examples

Protected Properties

Property Type Description
$formatArr array format合法值
$gravityArr array 水印图片位置合法值
$modeArr array mode合法范围值

Public Methods

Method Description
thumbnail ( string $url, integer $mode, integer $width, integer $height, string $format = null, integer $interlace = null, integer $quality = null, integer $ignoreError = 1 ) : string 缩略图链接拼接
waterImg ( string $url, string $image, numeric $dissolve = 100, string $gravity = 'SouthEast', numeric $dx = null, numeric $dy = null, numeric $watermarkScale = null ) : string 图片水印
waterText ( string $url, string $text, string $font = '黑体', string $fontSize, string $fontColor = null, numeric $dissolve = 100, string $gravity = 'SouthEast', numeric $dx = null, numeric $dy = null ) : string 文字水印

Protected Methods

Method Description
hasQuery ( string $url ) : string 检测是否有query
isUrl ( string $url ) : string 效验url合法性

Method Details

hasQuery() protected method

检测是否有query
Author: Sherlock Ren ([email protected])
protected hasQuery ( string $url ) : string
$url string url链接
return string

isUrl() protected method

效验url合法性
Author: Sherlock Ren ([email protected])
protected isUrl ( string $url ) : string
$url string url链接
return string

thumbnail() public method

缩略图链接拼接
public thumbnail ( string $url, integer $mode, integer $width, integer $height, string $format = null, integer $interlace = null, integer $quality = null, integer $ignoreError = 1 ) : string
$url string 图片链接
$mode integer 缩略模式
$width integer 宽度
$height integer 长度
$format string 输出类型
$interlace integer 是否支持渐进显示
$quality integer 图片质量
$ignoreError integer 忽略结果
return string

waterImg() public method

图片水印
public waterImg ( string $url, string $image, numeric $dissolve = 100, string $gravity = 'SouthEast', numeric $dx = null, numeric $dy = null, numeric $watermarkScale = null ) : string
$url string 图片链接
$image string 水印图片链接
$dissolve numeric 透明度
$gravity string 水印位置
$dx numeric 横轴边距
$dy numeric 纵轴边距
$watermarkScale numeric 自适应原图的短边比例
return string

waterText() public method

文字水印
public waterText ( string $url, string $text, string $font = '黑体', string $fontSize, string $fontColor = null, numeric $dissolve = 100, string $gravity = 'SouthEast', numeric $dx = null, numeric $dy = null ) : string
$url string 图片链接
$text string 文字
$font string 文字字体
$fontSize string 文字字号
$fontColor string 文字颜色
$dissolve numeric 透明度
$gravity string 水印位置
$dx numeric 横轴边距
$dy numeric 纵轴边距
return string

Property Details

$formatArr protected_oe property

format合法值
protected array $formatArr
return array

$gravityArr protected_oe property

水印图片位置合法值
protected array $gravityArr
return array

$modeArr protected_oe property

mode合法范围值
protected array $modeArr
return array