定制 tifon/automated_crop 二次开发

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

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

tifon/automated_crop

Composer 安装命令:

composer require tifon/automated_crop

包简介

Provides automated cropping tools API.

README 文档

README

Provides an API for automatic cropping tools integration.

Requirements

  • Latest release of Drupal 8.x.

Configuration

  • Go to (admin/config/media/image-styles/manage).
  • Edit an image style or create it.
  • Select a new effect Automated Crop.
  • Configure the effect as you need.
  • Upload an image with your image style used.
  • Your picture are automatically cropped as you want (in configuration).

Technical details

Initial discussion can be found on automated crop integration.

Uses case coverage

Case 1

All sizes of crop box are defined (Width AND Height), and do not take into account the aspect ratio of image. That similar to Scale & crop but that only applie an crop with specific sizes by center of image. I ve already think about the possibility to define another points to attach crop area but i think that is another case.

Case 2

Only one size are completed (Width OR Height), the algorithm do calculate the missing value with respect, of aspect ratio. It's important to notice that, if user have define any aspect ratio then the aspect ratio are original image aspect ratio but if user have define an enforced aspect ratio that is used to calculation of missing value to respect new aspect ratio.

Case 3

Any sizes values are defined, the algorythm are based on the maximum widht of original image and calculate height with respect of aspect ratio (in this case too, if user enforce original aspect ratio that take prior).

That is the three principal cases of crop functional in this module ATM.

Other usecases "combo" are available by example :

Scale & crop + Automated crop That can be used to resize an image onto specific size and after automated crop an other specific area onto image resized.

All other effects are compatible with this effect because Automated crop use the $image statement and the position of effect can affect the state of image by example if we apply an effect black & white after automated crop your crop zone are in black & white.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2021-10-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固