承接 tihiy-production/php-image-compressor 相关项目开发

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

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

tihiy-production/php-image-compressor

Composer 安装命令:

composer require tihiy-production/php-image-compressor

包简介

ImageCompressor - this is an easy way to compress images on the fly

README 文档

README

Latest Version on Packagist Total Downloads Software License

ImageCompressor - this is an easy way to compress images on the fly.

Requirements

The following libraries need to be installed:

Jpegoptim & Pngquant

sudo apt-get -y install jpegoptim pngquant

Installation

Execute the following command to install this package as a dependency in your project:

composer require "tihiy-production/php-image-compressor"

Usage

You can choose a local file as the source and write it to another file.

$source = tihiy\Compressor\ImageCompressor::sourceFile('uncompressed.jpg');
$source->toFile('compressed.jpg');

You can upload an image content as the source and get the compressed image data.

$sourceData = file_get_contents('uncompressed.jpg');
$resultData = tihiy\Compressor\ImageCompressor::sourceContent($sourceData)->toContent();

You can specify URL as a source to the image and compress it without having to upload.

$source = tihiy\Compressor\ImageCompressor::sourceUrl('https://example.com/uncompressed.jpg');
$source->toFile('compressed.jpg');

License

This software is licensed under the MIT License. View the license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-02-03

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固