deanblackborough/random-grab-bag
Composer 安装命令:
composer require deanblackborough/random-grab-bag
包简介
A random grab bag of utility classes that have no fixed abode yet.
README 文档
README
Random grab bag
Catch all library for utility classes.
Description
A random grab bag of utility classes that have no fixed abode yet.
Installation
The easiest way to use any of these classes is via composer. composer require deanblackborough/random-grab-bag,
alternatively include the classes in src/ in your library.
The classes
Image Resize
You can use the resize class via the API or directly if you want or need a little more control over the output and options.
API
$resizer = new DBlackborough\GrabBag\ImageResize($format);
$resizer->resizeTo(
$width,
$height,
$maintain_aspect = true,
$canvas_color = [ 'r' => 0, 'g' => 0, 'b' => 0]
)
->source($source_file, $source_path = '')
->target($target_file, $target_path = '');
Direct
$resizer = new DBlackborough\GrabBag\ImageResize\Jpeg();
$resizer->setOptions(
$width,
$height,
$maintain_aspect = true,
$canvas_color = [ 'r' => 0, 'g' => 0, 'b' => 0]
)
->loadImage($source_file, $source_path = '')
->resizeSource()
->createCopy()
->save();
Public methods
I've listed the methods, their params and the return type. If it isn't obvious what a method does I have done a bad job of naming it, if so, please let me know.
- createCopy() :
AbstractResize - getInfo() :
array - loadImage(
string$file,string$path = '') :AbstractResize - resizeSource() :
AbstractResize - save() :
AbstractResize - setCanvasColor(
array$canvas_color) :AbstractResize - setFileName(
string$filename) :AbstractResize - setHeight(
int$height) :AbstractResize - setOptions(
int$width,int$height,int$quality,bool$maintain_aspect = true,array$canvas_color = array('r' => 255, 'g' => 255, 'b' => 255)) :AbstractResize - setPath($path) :
AbstractResize - setWidth(int $width) :
AbstractResize
deanblackborough/random-grab-bag 适用场景与选型建议
deanblackborough/random-grab-bag 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 06 月 07 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「image-resize」 「image-crop」 「excel-parser」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 deanblackborough/random-grab-bag 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 deanblackborough/random-grab-bag 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 deanblackborough/random-grab-bag 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Croppie Js Implementation Field for Filament forms
Symfony 8 bundle for on-demand image processing, resizing, cropping, AVIF/WebP conversion, and caching. Filter pipelines with fit, fill, optimize, strip, interlace processors and avifenc, cwebp, MozJPEG, pngquant post-processors. Filesystem, stream, and S3 loaders/resolvers. HMAC-signed runtime URLs
High-performance, secure image processing for Laravel. Seamlessly generate signed imgproxy URLs to resize, crop, and transform images on the fly.
A blazingly fast XLSX parser for PHP 8.1+ that extracts data from spreadsheets with minimal dependencies
Magento 2 module for intelligent image resizing with caching and AI-powered image modification support using Google Gemini API
Laravel ImageKit is a comprehensive image processing package for Laravel. It provides an easy-to-use service for validating, resizing, compressing, watermarking, and storing images, all with minimal configuration and maximum flexibility. Perfect for managing image assets in your Laravel applications
统计信息
- 总下载量: 23
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 7
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-07