thecodeholic/bulk-image-resize 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

thecodeholic/bulk-image-resize

Composer 安装命令:

composer require thecodeholic/bulk-image-resize

包简介

README 文档

README

Using this package you can resize all images inside specific folder

Usage

Put images inside images folder and run php index.php from the project's root directory.

If you want to integrate this into your project use class ImageResize

$resizer = new ImageResize();
$resizer->resizeAllImages('directory under which you want to resize');

Options

// The image width which will be used to create thumbnails
$imageWidth = 128;
// Extensions to check each file against before trying to resize
$extensions = ['jpg', 'png'];

$resizer = new ImageResize($imageWidth, $extensions);
$resizer->resizeAllImages('directory under which you want to resize');

Events

$resizer = new ImageResize($imageWidth, $extensions);

// Before resizing the image
$resizer->onBeforeResize(function($path){
    echo "Before resize " . $path . PHP_EOL;
});
// After resizing the image
$resizer->onAfterResize(function($path){
    echo "After resize " . $path . PHP_EOL;
});

$resizer->resizeAllImages('directory under which you want to resize');

This project is part of the youtube video

统计信息

  • 总下载量: 50
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2020-02-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固