热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

glide-image-utility

EasilyconvertimageswithGlideImageUtilityThispackageprovidesaneasytouseclasstomanipulateimages.Usingthispackagewecanmanipulateawss3bucketimagealso.Here'sanexampleofhowthepackagecanbeused:

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:

 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 .


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


推荐阅读
  • CEPH LIO iSCSI Gateway及其使用参考文档
    本文介绍了CEPH LIO iSCSI Gateway以及使用该网关的参考文档,包括Ceph Block Device、CEPH ISCSI GATEWAY、USING AN ISCSI GATEWAY等。同时提供了多个参考链接,详细介绍了CEPH LIO iSCSI Gateway的配置和使用方法。 ... [详细]
  • 一、概述ceph为k8s提供存储服务主要有两种方式,cephfs和cephrdb;cephfs方式支持k8s的pv的3种访问模式ReadWriteOnce,ReadOnlyMany ... [详细]
  • 如何通过swoole加速laravel的问题?
    这篇文章主要介绍了关于如何使用swoole加速laravel,有着一定的参考价值,现在分享给大家,有需要的朋友可以参考一下再来复习一下吧,导致php慢的各种因素中解析性语言的 ... [详细]
  • 问题说明最近看到Spring事务,在学习过程中遇到一个很苦恼问题搭建好Spring的启动环境后出现了一点小问题在启动时候却出现[java.lang.NullPointerExcep ... [详细]
  • Mysql安装和初步使用
    2019独角兽企业重金招聘Python工程师标准一、安装1、下载及安装:官网:https:downloads.mysql.comarchivesc ... [详细]
  • 一安装配置1.配置文件mongod.cfg(路径:D:\data\config\mongod.cfg)如下:    systemLog:destination ... [详细]
  • 人生的旅途,前途很远,也很暗。然而不要怕,不怕的人的面前才有路。——鲁迅自从上一篇博客发布后,已经有很长时间没有更新博客了,一直忙着支付通的事情,在此给大家道个歉。先贴个图:你不要惊讶 ... [详细]
  • 本文介绍了Android 7的学习笔记总结,包括最新的移动架构视频、大厂安卓面试真题和项目实战源码讲义。同时还分享了开源的完整内容,并提醒读者在使用FileProvider适配时要注意不同模块的AndroidManfiest.xml中配置的xml文件名必须不同,否则会出现问题。 ... [详细]
  • 国庆节到了,安利一个Android的自动动态授权插件
    Android的老铁都知道申请权限时,除了要在AndroidManifest添加权限,还需要在activity中通过requestpermission对 ... [详细]
  • syncd是一款开源的代码部署工具,它具有简单、高效、易用等特点,可以提高团队的工作效率. ... [详细]
  • laravel 使用腾讯云 COS5全教程
    laravel使用腾讯云COS5全教程一下载首先第一步肯定是用composer把包安装下来,这里是laravel5.8版本的,所以我用的是cos5 ... [详细]
  • php composer 安装,phpstudy  composer 使用安装
    本人是windows系统phpstudy是最新2018版本以安装laravel框架为例子一如图一,点击phpComposer出现系统指令框,根据指令框路 ... [详细]
  • 本文是《开发你的WordPress主题框架》专题的第10篇,共10篇:为你的WordPress主题框架添加动作挂钩WordPress主题框架是如何工作的决定如何开发你的WordPress主题框架为你的WordPress主题框架建立起始文件为你的Wo ... [详细]
  • 缓冲区溢出实例(一)–Windows
    一、基本概念缓冲区溢出:当缓冲区边界限制不严格时,由于变量传入畸形数据或程序运行错误,导致缓冲区被填满从而覆盖了相邻内存区域的数据。可以修改内存数据,造成进程劫持,执行恶意代码,获 ... [详细]
  • predis与phpredisredis官方推荐的php客户端是predis和phpredis。前者是完全使用php代码实现的原生客户端,后者则是用c编写的php拓展 ... [详细]
author-avatar
mobiledu2502852497
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有