最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php给图加水印二
时间:2008-04-28 编辑:简简单单 来源:一聚教程网
/**
* 设置水印字体
*
* @param string|integer $font 字体
*/
function setMaskFont($font=2)
{
if(!is_numeric($font) && !file_exists($font))
{
die("字体文件不存在");
}
$this->font = $font;
}
/**
* 设置文字字体大小,仅对truetype字体有效
*/
function setMaskFontSize($size = "12")
{
$this->font_size = $size;
}
/**
* 设置图片水印
*
* @param string $img 水印图片源
*/
function setMaskImg($img)
{
$this->mask_img = $img;
}
/**
* 设置水印横向偏移
*
* @param integer $x 横向偏移量
*/
function setMaskOffsetX($x)
{
$this->mask_offset_x = (int)$x;
}
/**
* 设置水印纵向偏移
*
* @param integer $y 纵向偏移量
*/
function setMaskOffsetY($y)
{
$this->mask_offset_y = (int)$y;
}
/**
* 指定水印位置
*
* @param integer $position 位置,1:左上,2:左下,3:右上,0/4:右下
*/
function setMaskPosition($position=0)
{
$this->mask_position = (int)$position;
}
/**
* 设置图片合并程度
*
* @param integer $n 合并程度
*/
function setMaskImgPct($n)
{
$this->mask_img_pct = (int)$n;
}
/**
* 设置文字合并程度
*
* @param integer $n 合并程度
*/
?>
-
上一个: php 给图片加水印
-
下一个: php 给图片加水印三
相关文章
- thinkPHP框架实现图像裁剪、缩放、加水印的方法 06-27
- PHP imagecopy()与imagecopymerge()图像添加水印 07-02
- PHP导出数据超时的优化建议解读 10-31
- PHP之mysql位运算解析 10-31
- Laravel实现登录跳转功能解析 10-31
- php双向队列解读 10-31