定制 cdcchen/oss-image-url-maker 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

cdcchen/oss-image-url-maker

Composer 安装命令:

composer require cdcchen/oss-image-url-maker

包简介

oss image url maker

README 文档

README

composer 安装

composer require cdcchen/oss-image-url-maker:^1.0.0

使用教程

实例化 Maker

use cdcchen\oss\ImageUrlMaker;

$maker = new ImageUrlMaker($url);

获取预定义样式地址

$url = $maker->getStyleUrl($styleName);

获取参数方式地址

$url = $maker->fitByWidth($width)->getUrl();

or

$url = (string)$maker->fitByWidth($width);

参数方式预定义方法列表

缩放

  • resize($mode = null, $width = 0, $height = 0, $limit = null, $color = null)
  • resizeMFit($width = 0, $height = 0, $limit = null)
  • resizeLFit($width = 0, $height = 0, $limit = null)
  • resizeFill($width = 0, $height = 0, $limit = null)
  • resizePad($width = 0, $height = 0, $limit = null, $color = null)
  • resizeFixed($width = 0, $height = 0, $limit = null)
  • fitMaxSize($width = 0, $height = 0)
  • fitMinSize($width = 0, $height = 0)
  • fitByWidth($width)
  • fitByHeight($height)
  • fixedSize($width = 0, $height = 0)
  • fixedWidth($width)
  • fixedHeight($height)

裁剪

  • circle($radius)
  • roundedCorners($radius)
  • crop($width = 0, $height = 0, $x = 0, $y = 0, $g = null)
  • indexCropX($width, $i = 0)
  • indexCropY($height, $i = 0)

旋转

  • autoOrient($value = 1)
  • rotate($angle)

效果

  • blur($radius, $sigma)
  • bright($value)
  • contrast($value)
  • sharpen($value = 100)

格式

  • format($format, $interlace = false)
  • interlace($value = true)
  • quality($quality, $absolute = true)

水印

暂无

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-4-Clause
  • 更新时间: 2016-12-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固