Download the PHP package wiseadmin/wise-image without Composer
On this page you can find all versions of the php package wiseadmin/wise-image. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package wise-image
wiseadmin/wise-image
WiseAdmin 图片处理包 — 支持 GD/Imagick 双驱动、阿里云 OSS 风格参数处理、防盗链与签名验证
特性
| 模块 | 说明 |
|---|---|
| 双驱动 | GD(PHP 内置)/ Imagick(更优性能),驱动层完全解耦 |
| 9 种处理器 | 缩放、裁剪、旋转、水印、模糊、亮度、对比度、格式转换、质量调整 |
| 链式操作 | open()->resize()->watermark()->save() 构建器风格 |
| OSS 风格 URL | 从 URL 参数 ?x-oss-process=image/resize,w_200 解析操作链 |
| 缓存系统 | 支持 File / Redis 双缓存,TTL 可配 |
| 安全防护 | IP 黑名单、Referer 白名单/黑名单、签名防盗链、源图保护 |
| 样式预设 | 预定义样式(如 thumb),一键应用 |
| HTTP 响应 | 内置路由,直接输出处理后的图片 |
安装
驱动依赖:
- GD 驱动(默认,零配置):需 PHP
ext-gd扩展 - Imagick 驱动(推荐,性能更优):需 PHP
ext-imagick扩展
配置
发布配置文件:
配置文件 config/wise-image.php:
使用指南
1. 基本操作(Facade)
2. 链式操作
3. OSS 风格 URL 参数
URL 格式:?x-oss-process=image/resize,w_400,h_300/quality,q_80
4. 使用预定义样式
5. HTTP 响应输出
6. 依赖注入方式
7. 命令行
处理器说明
| 处理器 | 方法 | 参数 | 说明 |
|---|---|---|---|
| Resize | resize($w, $h, $mode) |
w, h, mode(contain/fill/cover) | 缩放 |
| Crop | crop($w, $h, $x, $y) |
w, h, x, y | 裁剪 |
| Rotate | rotate($angle) |
angle(0-360) | 旋转 |
| Watermark | watermark($path, $pos, $opacity) |
path, pos, opacity(0-100) | 图片水印 |
| Blur | blur($radius) |
radius | 高斯模糊 |
| Brightness | brightness($level) |
level(-100~100) | 亮度调整 |
| Contrast | contrast($level) |
level(-100~100) | 对比度调整 |
| Format | format($ext) |
ext(jpg/png/webp/gif) | 格式转换 |
| Quality | quality($q) |
q(1-100) | 质量 |
目录结构
License
MIT
All versions of wise-image with dependencies
PHP Build Version
Package Version
The package wiseadmin/wise-image contains the following files
Loading the files please wait ...