承接 gevo/sqip_img_converter 相关项目开发

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

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

gevo/sqip_img_converter

最新稳定版本:v1.0.0

Composer 安装命令:

composer require gevo/sqip_img_converter

包简介

Converts image to placeholders using sqip

README 文档

README

This project provides a PHP class for converting images to SVG placeholders using Sqip.

Installation

Use composer to install the project:

composer require gevo/img-converter-sqip

Packagist link

Make sure to have sqip globally installed on your machine following the official guide

Usage

use Gevo\ImgConverterSqip\Converter;

$converter = new Converter($inputPath, $outputPath);
$converter->convert();

In this example, $inputPath is the path to the input image and $outputPath is the path where the SVG placeholder should be saved.

Exception Handling

The convert method may throw an ImgConverterSqipException if there's a problem during the conversion process. You should catch this exception in your code and handle it appropriately.

use Gevo\ImgConverterSqip\Converter;
use Gevo\ImgConverterSqip\ImgConverterSqipException;

try {
    $converter = new Converter($inputPath, $outputPath);
    $converter->convert();
} catch (ImgConverterSqipException $e) {
    // Handle exception
}

License

This project is licensed under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-02-24