承接 deanblackborough/random-grab-bag 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

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

Latest Stable Version License Minimum PHP Version

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

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-06-07

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固