glide-image-utility

栏目: IT技术 · 发布时间: 4年前

内容简介:Easily convert images with Glide Image UtilityThis package provides an easy to use class to manipulate images. Using this package we can manipulate aws s3 bucket image also.Here's an example of how the package can be used:

Glide Image Utility

Easily convert images with Glide Image Utility

This package provides an easy to use class to manipulate images. Using this package we can manipulate aws s3 bucket image also.

Here's an example of how the package can be used:

MiImage::createImage($ImagePath,['w'=> 50, 'h'=>100, 'fit'=>'crop', 'bg' => 'CCC']);

Installation

You can install the package through Composer.

composer require mindinventory/glide-image-utility

In Laravel 5.5 the service provider and facade will automatically get registered. In older versions of the framework just add the service provider and facade in config/app.php file:

'providers' => [
    ...
    Mi\MiImageUtility\ImageServiceProvider::class,
    ...
];

You can publish the config file of the package using artisan.

php artisan vendor:publish --provider="Mi\MiImageUtility\ImageServiceProvider" --tag=config

The config file looks like this:

<?php

return [
    /* This is cache folder that create inside storage/images/cache folder */
    'cache_folder' => env('Cache_Folder', storage_path('images/cache')),
];

Usage

Here's a quick example that shows how an image can be modified:

MiImage::createImage($pathToImage,['w'=> 50, 'h'=>50, 'fit'=>'crop', 'bg' => 'CCC']);

In modification parameter you can use w = Width, h = Height, fit = Fit parameter [contain, max, fill, stretch, crop], q = Quality [Between 0 to 100], fm = Format [jpg, pjeg(progressive jpg), gif, webp] bg = Background Color For More Colors

Support us

Mindinventory itself is a self-explanatory word. In fact, we have accumulated the best talents available in India, particularly from the eminent technical education institutes located at Ahmedabad in the western Indian region where headquarter is located. Please visit our website .


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

C和指针

C和指针

Kenneth A.Reek / 徐波 / 人民邮电出版社 / 2008 年4月 / 65.00元

本书提供与C语言编程相关的全面资源和深入讨论。本书通过对指针的基础知识和高级特性的探讨,帮助程序员把指针的强大功能融入到自己的程序中去。 全书共18章,覆盖了数据、语句、操作符和表达式、指针、函数、数组、字符串、结构和联合等几乎所有重要的C编程话题。书中给出了很多编程技巧和提示,每章后面有针对性很强的练习,附录部分则给出了部分练习的解答。 本书适合C语言初学者和初级C程序员阅读,也可作......一起来看看 《C和指针》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

CSS 压缩/解压工具
CSS 压缩/解压工具

在线压缩/解压 CSS 代码

HTML 编码/解码
HTML 编码/解码

HTML 编码/解码