2017 © Pedro Pelรกez
 

library dyreimage-php

This is an image resizing project.

image

yusufshakeel/dyreimage-php

This is an image resizing project.

  • Wednesday, April 18, 2018
  • by yusufshakeel
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

dyreimage-php

This is an image resizing project., (*1)

Status

license Build Status npm version Bower, (*2)

Documentation

Click here for the documentation., (*3)

Getting started

  • Download the latest release.
  • Clone the repo: git clone https://github.com/yusufshakeel/dyreimage-php.git
  • Install with Bower: bower install dyreimage-php
  • Install with npm: npm install dyreimage-php
  • Install using composer composer require yusufshakeel/dyreimage-php

Requirement

DYReImage requires the following: * PHP version 5.5 or higher. * GD extension., (*4)

Brief history

I was working on an Image Processing Project when I was in college back in 2014. Created this project back then and then decided to make some more changes and put it on GitHub., (*5)

What's inside

dyreimage-php/
โ”œโ”€โ”€ image/
โ”‚   โ””โ”€โ”€ sample.jpeg
โ”œโ”€โ”€ src/
โ”‚   โ””โ”€โ”€ DYReImage/
โ”‚       โ”œโ”€โ”€ Core/
โ”‚       โ”‚   โ”œโ”€โ”€ Config.php
โ”‚       โ”‚   โ”œโ”€โ”€ Helper.php
โ”‚       โ”‚   โ””โ”€โ”€ Validator.php
โ”‚       โ”œโ”€โ”€ Utilities/
โ”‚       โ”‚   โ”œโ”€โ”€ Image.php
โ”‚       โ”‚   โ””โ”€โ”€ Resize.php
โ”‚       โ”œโ”€โ”€ autoload.php
โ”‚       โ””โ”€โ”€ DYReImage.php
โ”œโ”€โ”€ tests/
โ””โ”€โ”€ index.php

How to use?

Include the DYReImage directory which is inside the src directory in your project. Now to start using it write the following code., (*6)

 200,
  "width" => 400,
  "quality" => 80
);

// resize
try {
  $obj = new DYReImage\DYReImage($source, $destination, $option);
  $obj->resize();
} catch(\Exception $e) {
  die("Error: " . $e->getMessage());
}
?>

Note! You must have write permission in order to save the resized image in the destination directory., (*7)

Create grayscale image

require_once 'path/to/DYReImage/autoload.php';

$source = 'path/to/image/sample.jpg';
$destination = 'path/to/image/output.png';
$option = array(
    "quality" => 80
);

try {
    $obj = new DYReImage\DYReImage($source, $destination, $option);
    $obj->grayscaleImage();
} catch(\Exception $e) {
    die("Error: " . $e->getMessage());
}

Create red image

require_once 'path/to/DYReImage/autoload.php';

$source = 'path/to/image/sample.jpg';
$destination = 'path/to/image/output.png';
$option = array(
    "quality" => 80
);

try {
    $obj = new DYReImage\DYReImage($source, $destination, $option);
    $obj->redImage();
} catch(\Exception $e) {
    die("Error: " . $e->getMessage());
}

Create green image

require_once 'path/to/DYReImage/autoload.php';

$source = 'path/to/image/sample.jpg';
$destination = 'path/to/image/output.png';
$option = array(
    "quality" => 80
);

try {
    $obj = new DYReImage\DYReImage($source, $destination, $option);
    $obj->greenImage();
} catch(\Exception $e) {
    die("Error: " . $e->getMessage());
}

Create blue image

require_once 'path/to/DYReImage/autoload.php';

$source = 'path/to/image/sample.jpg';
$destination = 'path/to/image/output.png';
$option = array(
    "quality" => 80
);

try {
    $obj = new DYReImage\DYReImage($source, $destination, $option);
    $obj->blueImage();
} catch(\Exception $e) {
    die("Error: " . $e->getMessage());
}

License

It's free and released under MIT License Copyright (c) 2017 Yusuf Shakeel, (*8)

Buy me a cup of tea

If you enjoy watching my YouTube videos and find my projects here on GitHub interesting and helpful then feel free to buy me a cup of tea or coffee. It helps in creating more :), (*9)

Donate via PayPal, (*10)

The Versions

18/04 2018

dev-master

9999999-dev https://github.com/yusufshakeel/dyreimage-php

This is an image resizing project.

  Sources   Download

The Requires

  • php ^5.5.0

 

The Development Requires

php image resizing

18/04 2018

v1.1.2

1.1.2.0 https://github.com/yusufshakeel/dyreimage-php

This is an image resizing project.

  Sources   Download

The Requires

  • php ^5.5.0

 

The Development Requires

php image resizing

18/04 2018

dev-dev

dev-dev https://github.com/yusufshakeel/dyreimage-php

This is an image resizing project.

  Sources   Download

The Requires

  • php ^5.5.0

 

The Development Requires

php image resizing

05/07 2017

v1.1.0

1.1.0.0 https://github.com/yusufshakeel/dyreimage-php

This is an image resizing project.

  Sources   Download

MIT License

The Requires

  • php >=5.5.0

 

The Development Requires

php image resizing

22/04 2017

v1.0.0

1.0.0.0 https://github.com/yusufshakeel/dyreimage-php

This is an image resizing project.

  Sources   Download

MIT License

The Requires

  • php >=5.5.0

 

The Development Requires

php image resizing