承接 femtopixel/crop 相关项目开发

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

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

femtopixel/crop

Composer 安装命令:

composer require femtopixel/crop

包简介

PHP Component to resize images from a configuration file

README 文档

README

Caution

As-of 2021, this product does not have a free support team anymore. If you want this product to be maintained, please support my work.

Note

(This product is available under a free and permissive license, but needs financial support to sustain its continued improvements. In addition to maintenance and stability there are many desirable features yet to be added.)

logo

Crop

Latest Stable Version Minimum PHP Version License PayPal donation Buy me a coffee Buy me a coffee

This component will resize images following configuration rules. allows only defined format

Installation

composer require femtopixel/crop

Usage

<?php
$formats = array(
    'mini' => array(
        'width' => 100,
        'height' => 100,
        'full' => 'cropped',
    ),
);
$image = new \FemtoPixel\Crop\Crop('/path/to/file.png', 'mini');
$image->setFormatsFromArray($formats)->render();

You can define as many format that you want!

  • First parameter is path to your file to display
  • Second (optional) is the format you want to display in (default : 'original' (no modification))
  • Third (optional) is path to default image displayed if path in first parameter doesn't exist. This file will be displayed in requested format. (default : 'src/missing.png')

Configuration

Each format given in method setFormatsFromArray must define width, height and optional full index.

full can be configured to 4 values depending on attended rendering :

  • none : No cropping, no resize. Will render image with original file dimensions.
  • cropped : Crop the rendered image to be exactly dimensions defined in configuration.
  • height : Resize the image without distortion to have height to value defined in configuration.
  • width : Resize the image without distortion to have width to value defined in configuration.

femtopixel/crop 适用场景与选型建议

femtopixel/crop 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 816 次下载、GitHub Stars 达 2, 最近一次更新时间为 2016 年 06 月 14 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 femtopixel/crop 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 femtopixel/crop 我们能提供哪些服务?
定制开发 / 二次开发

基于 femtopixel/crop 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-14