定制 iamriajul/thumbhash-laravel 二次开发

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

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

iamriajul/thumbhash-laravel

最新稳定版本:1.0.3

Composer 安装命令:

composer require iamriajul/thumbhash-laravel

包简介

A PHP implementation of Thumbhash with Laravel integration.

README 文档

README

Testing Latest Stable Version Total Downloads License

A PHP implementation of Thumbhash with Laravel integration.

Thumbhash is a compact representation of a placeholder for an image.

screenshot

XFYJhIooaHh6d3hweYuHgHoJmA

⚠️ I highly recommend to have Imagick extension installed on your computer. GD extension has only 7 bits of alpha channel resolution, and 127 is transparent, 0 opaque. While the library will still work, you may have different image between platforms. See on stackoverflow

Supported Laravel Version

9.0 ~ 12.x

Installation

Install using composer

composer require iamriajul/thumbhash-laravel

Publish config file (Optional for )

php artisan vendor:publish --provider="Riajul\Thumbhash\ThumbhashServiceProvider"

Set up config file on config/thumbhash.php

Done!

Usage

Facade

Thumbhash::encode($file);

$file can be any Intervention make method acceptable source.

app helper function

app('thumbhash')
  ->encode(request('file'));

TODO:

  • Support decoding from thumbhash base64 string.
  • Support encoding to thumbhash binary array.
  • Support decoding from thumbhash binary array.
  • Support encoding to dataURL.

License

Thumbhash is licensed under The MIT License (MIT).

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-10-31