Метод | Описание | |
---|---|---|
addWaterMark ( string $sourceImage, string $waterMarkImage, null | string $saveName = null, integer $alpha = 80, null $positionW = null, null $positionH = null, integer $quality = 100 ) : mixed | 图片打水印 | |
getImageInfo ( string $image ) : array | false | 取得图像信息 | |
makeThumb ( string $image, string $thumbName, null $type = null, integer $width = 100, integer $height = 50, boolean $isAutoFix = true ) : false | string | 生成缩略图 | |
output ( string &$image, string $type = 'png', string $filename = null, integer $quality = 100 ) : mixed | 输出图片 |
public static addWaterMark ( string $sourceImage, string $waterMarkImage, null | string $saveName = null, integer $alpha = 80, null $positionW = null, null $positionH = null, integer $quality = 100 ) : mixed | ||
$sourceImage | string | 源图片 |
$waterMarkImage | string | 水印 |
$saveName | null | string | 保存路径,默认为覆盖原图 |
$alpha | integer | 水印透明度 |
$positionW | null | 水印位置 相对原图横坐标 |
$positionH | null | 水印位置 相对原图纵坐标 |
$quality | integer | 生成的图片的质量 jpeg有效 |
Результат | mixed |
public static getImageInfo ( string $image ) : array | false | ||
$image | string | 图像文件名 |
Результат | array | false | | false |
public static makeThumb ( string $image, string $thumbName, null $type = null, integer $width = 100, integer $height = 50, boolean $isAutoFix = true ) : false | string | ||
$image | string | 要缩略的图 |
$thumbName | string | 生成的缩略图的路径 |
$type | null | 要生成的图片类型 默认跟原图一样 |
$width | integer | 缩略图的宽度 |
$height | integer | 缩略图的高度 |
$isAutoFix | boolean | 是否按比例缩放 |
Результат | false | string |