- /**
- * 添加水印
- * @param string $source 水印图片路径
- * @param integer $locate 水印位置
- * @param integer $alpha 水印透明度
- * @return Object 当前图片处理库对象
- */
- public function water($source, $locate = self::IMAGE_WATER_SOUTHEAST,$alpha=80){
- $this->img->water($source, $locate,$alpha);
- return $this;
- }
- /* 水印相关常量定义 */
- const IMAGE_WATER_NORTHWEST = 1 ; //常量,标识左上角水印
- const IMAGE_WATER_NORTH = 2 ; //常量,标识上居中水印
- const IMAGE_WATER_NORTHEAST = 3 ; //常量,标识右上角水印
- const IMAGE_WATER_WEST = 4 ; //常量,标识左居中水印
- const IMAGE_WATER_CENTER = 5 ; //常量,标识居中水印
- const IMAGE_WATER_EAST = 6 ; //常量,标识右居中水印
- const IMAGE_WATER_SOUTHWEST = 7 ; //常量,标识左下角水印
- const IMAGE_WATER_SOUTH = 8 ; //常量,标识下居中水印
- const IMAGE_WATER_SOUTHEAST = 9 ; //常量,标识右下角水印