<?php class Image { private $info; private $image; public $type; public function __construct($src) { $this->info=getimagesize($src); $this->type=image_type_to_extension($this->info['2'],false); $fun="imagecreatefrom{$this->type}"; $this->image=$fun($src); }
这是一个可以操作图片的类库,可以给图片添加水印,压缩图片,剪切图片。
* 文字水印
* @param [type] $font 字体
* @param [type] $content 内容
* @param [type] $size 文字大小
* @param [type] $col 文字颜色(四元数组)
* @param array $location 位置
* @param integer $angle 倾斜角度
* @return [type]
* 图片水印
* @param [type] $imageMark 水印图片地址
* @param [type] $dst 水印图片在原图片中的位置
* @param [type] $pct 透明度
* @return [type]
* 压缩图片
* @param [type] $thumbSize 压缩图片大小
* @return [type] [description]
* 裁剪图片
* @param [type] $cutSize 裁剪大小
* @param [type] $location 裁剪位置
* @return [type] [description]
* 展现图片
* @return [type] [description]
* 保存图片
* @param [type] $newname 新图片名
* @return [type] [description]
本站所有资源均由网友贡献或各大下载网站转载。请自行检查软件的完整性!本站所有资源仅供学习参考。请不要将它们用于商业目的。否则,一切后果由您负责!如有侵权,请联系我们删除。联系方式:admin@php.cn
相关文章
21Nov2024
解决 UnsatisfiedLinkError: Can't Find Dependent Libraries in JNI Projects当开发 Java Native Interface (JNI) 项目时,您可能...
30Oct2019
phpmyadmin不显示登录页面解决方法:找到并打开phpMyAdmin\libraries\plugins\auth\AuthenticationCookie.class.php文件,将其中关于登录页面代码中的两处hide删除即可。
20Oct2024
phpMyAdmin 错误:“count():参数必须是实现可数的数组或对象”您是否遇到过 phpMyAdmin 错误,指出“./libraries/sql.lib.php#601\ncount() 中的警告:参数必须是数组或对象
19Oct2024
dacom.dll 在我的计算机上做什么? dacom.dll 是 Microsoft Corporation 创建的 Digital Anvil Component Libraries 使用的 DLL 文件。此过程仍在审核中。 dacom.dll 等非系统进程源自您安装的软件
17Nov2024
Create a Masonry Grid with CSS Grid Layout (or Other CSS)该问题询问一种在 CSS 中实现砖石网格效果的方法...
16Oct2024
ctvcal.dll 在我的计算机上做什么? ctvcal.dll 是属于 Oracle Corporation 的 Oracle Calendar Libraries 的一个模块。 ctvcal.dll 等非系统进程源自您系统上安装的软件。由于大多数应用程序