2017 © Pedro Peláez
 

library ext-tool-image

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

image

mvccore/ext-tool-image

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

  • Monday, June 4, 2018
  • by tomFlidr
  • Repository
  • 1 Watchers
  • 0 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

MvcCore - Extension - Tool - Image

Latest Stable Version License PHP Version, (*1)

Installation

composer require mvccore/ext-tool-image

Features

Extension helps to process many popular web images operations:, (*2)

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

<?php

include_once('vendor/autoload.php');

use \MvcCore\Ext\Tools;

// resize `source.jpg` to `thumb.jpg`:
$image = Tools\Image::CreateInstance()
    ->Load(__DIR__ . "/source.jpg")
    ->ResizeByHeight(150)
    ->UnsharpMask(300, 0.7, 50)
    ->Save(
        __DIR__ . "/thumb.jpg",
        Tools\Images\IFormat::JPG,
        100
    );

// display original and resized image:
echo '<html><body>',
     '<img src="source.jpg" />',
     '<br />',
     '<img src="thumb.jpg" />',
     '</body></html>';

Imagick Windows binaries for dummies:

  • http://windows.php.net/downloads/pecl/deps/
  • http://windows.php.net/downloads/pecl/releases/imagick/3.4.3/

The Versions

04/06 2018

dev-master

9999999-dev

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

  • php >=5.3.0

plugin framework extension mvc image resize crop mask images plug-in tool ext mvccore sharp

17/12 2017

v4.3.1

4.3.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

  • php >=5.3.0

plugin framework extension mvc image resize crop mask images plug-in tool ext mvccore sharp

20/11 2017

v4.2.1

4.2.1.0

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

  • php >=5.3.0

plugin framework extension mvc image resize crop mask images plug-in tool ext mvccore sharp

16/11 2017

v4.2.0

4.2.0.0

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

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.3.0

 

The Development Requires

  • php >=5.3.0

plugin framework extension mvc image resize crop mask images plug-in tool ext mvccore sharp