PHPackages                             mvccore/ext-tool-image - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. mvccore/ext-tool-image

ActiveLibrary[Framework](/categories/framework)

mvccore/ext-tool-image
======================

MvcCore - Extension - Tool - Image - object oriented image processing tool supporting many popular web images operations.

v5.3.0(1y ago)12291BSD-3-ClausePHPPHP &gt;=5.4.0

Since Nov 16Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mvccore/ext-tool-image)[ Packagist](https://packagist.org/packages/mvccore/ext-tool-image)[ RSS](/packages/mvccore-ext-tool-image/feed)WikiDiscussions master Synced today

READMEChangelog (8)Dependencies (1)Versions (9)Used By (0)

MvcCore - Extension - Tool - Image
==================================

[](#mvccore---extension---tool---image)

[![Latest Stable Version](https://camo.githubusercontent.com/6a0e9e7da98c52006afe617f10a93df0da2dce64b73eedf5b9b3fcee6bfb6039/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f537461626c652d76352e332e302d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://github.com/mvccore/ext-tool-image/releases)[![License](https://camo.githubusercontent.com/53baed538c1c87a033a212f6f4acce684d36137f8622307643ab25e08118452e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d425344253230332d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://mvccore.github.io/docs/mvccore/5.0.0/LICENSE.md)[![PHP Version](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)](https://camo.githubusercontent.com/9e923690739211296a00adce5d359999dfa345f80fc1b2e2cfe72c49523ee334/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d2533453d352e342d627269676874677265656e2e7376673f7374796c653d706c6173746963)

Installation
------------

[](#installation)

```
composer require mvccore/ext-tool-image
```

Features
--------

[](#features)

Extension helps to process many popular web images operations:

```
Image	Image::AddOverlay($overlayImgFullPath, $x, $y, $alpha, $composite); // Adding overlay image is not implemented for Gd adapter
Image	Image::ApplyMask($maskImgFullPath);
Image	Image::Contain($width, $height);
Image	Image::Cover($width, $height, $orientation);
Image	Image::CreateEmptyImageResource($width, $height, $hexBgColor = 'transparent');
Image	Image::Crop($x, $y, $width, $height);
Image	Image::CropPercent($xPercentage, $yPercentage, $widthPercentage, $heightPercentage);
Image	Image::Frame($width, $height);
int	Image::GetHeight();
int	Image::GetWidth();
Image	Image::Grayscale();
array	Image::HexColor2RgbArrayColor($hexColor);
bool	Image::IsVectorGraphic();
Image	Image::Load($imgFullPath);
Image	Image::Resize($width, $height);
Image	Image::ResizeByHeight($height);
Image	Image::ResizeByPixelsCount($count);
Image	Image::ResizeByWidth($width);
Image	Image::Rotate($angle);
Image	Image::RoundCorners($x, $y);
Image	Image::Sepia($threshold = 80);
Image	Image::SetBackgroundColor($hexColor);
Image	Image::SetBackgroundImage($bgImgFullPath);
Image	Image::Save($imgFullPath, $format, $quality);
Image	Image::UnsharpMask($amount, $radius, $threshold);
```

Usage
-----

[](#usage)

```
