PHP Classes

PHP Image Manipulation Class: Manipulate images in several ways

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not enough user ratingsTotal: 316 All time: 7,259 This week: 54Up
Version License PHP version Categories
php-image-classes 1.0.2MIT/X Consortium ...5PHP 5, Graphics
Description 

Author

This package can manipulate images in several ways.

It can take an image and manipulate it in different ways.

Currently it can resize the image, change its brightness level, perform many types of effects, blur, crop, flip, rotate, and add a border to the image.

Picture of Muhammad Umer Farooq
Name: Muhammad Umer Farooq <contact>
Classes: 52 packages by
Country: Pakistan Pakistan
Innovation award
Innovation award
Nominee: 6x

 

Example

<?php

require_once 'classes/Image.php';
$img = new Image();

//$img->SetHeaders();

/*
//image resize
$size = $img->ImageResize(
    [
        'source' => 'img/umer.png',
        'w' => 100,
        'h' => 150,
        'save' => true,
        'target' => 'img/resize1.png'
    ]);
*/

/*
//image brightness
$size = $img->ImageBrightness(
    [
        'source' => 'img/umer.png',
        'brightness' => 120,
        //optional parameters
        'save' => true,
        'target' => 'img/bright.png'
    ]);
*/

/*
//image effects
$size = $img->ImageEffects(
    [
        'source' => 'img/umer.png',
        'effect' => 'green_night',
        'opacity' => 30,
        //optional parameters
        //'save' => true,
        //'target' => 'img/effets_green_night.png'
    ]);
*/

/*
//image blur
$size = $img->ImageBlur(
    [
        'source' => 'img/umer.png',
        'blur_opacity' => 100,
        //optional parameters
        'save' => true,
        'target' => 'img/blur.png'
    ]);
*/

/*
//crop image
$size = $img->ImageCrop(
    [
        'source' => 'img/umer.png',
        'x' => 100,
        'y' => 150,
        //optional parameters
        'save' => true,
        'target' => 'img/crop.png'
]);
*/

/*
//flip
$size = $img->ImageFlip(
    [
        'source' => 'img/umer.png',
        'flip' => 'horizontal',
        //optional parameters
        'save' => true,
        'target' => 'img/flip_hori.png'
]);
*/

/*
//Image rotate
$size = $img->ImageRotate(
    [
        'source' => 'img/umer.png',
        //rotate in degree
        'rotate' => 150,

        //if you want provide color of the uncovered zone after the rotation
        'bg_color' =>
        [
            'red' => 14,
            'green' => 255,
            'blue' => 140,
        ],

        //optional parameters
        'save' => true,
        'target' => 'img/rotate1.png'
]);
*/

/*
//image border
$size = $img->ImageBorder(
    [
        'source' => 'img/umer.png',
        'thickness' => 10,
        'bg_color' =>
        [
            'red' => 14,
            'green' => 255,
            'blue' => 140,
        ],
        //optional parameters
        'save' => true,
        'target' => 'img/border.png'
]);
*/


Details

PHP Image class

This package can

1. Resize Image 2. Change brightness 3. Effects (29 effects more are added soon) 4. Blur 5. Crop 6. Flip 7. Rotate 8. Add border to image

Sample

Image effects

TPimk

![Image effects][1]

Sunshine

![Image effects][2]

Sepia1

![Image effects][3]

Sepia

![Image effects][4]

Pixel

![Image effects][5]

Pixel1

![Image effects][6]

Pixel2

![Image effects][7]

Negative

![Image effects][8]

Light

![Image effects][9]

Hot

![Image effects][10]

Highlight

![Image effects][11]

More

For more images effects and edits goto img folder

[1]: https://i.imgur.com/yu6a6w3.jpg [2]: https://i.imgur.com/Qly2qg3.jpg [3]: https://i.imgur.com/Bmhdhxb.jpg [4]: https://i.imgur.com/CRHCNMW.jpg [5]: https://i.imgur.com/m8sLwuj.jpg [6]: https://i.imgur.com/eN7qsdR.jpg [7]: https://i.imgur.com/j7tzrHO.jpg [8]: https://i.imgur.com/WrNXY3t.jpg [9]: https://i.imgur.com/nrOkLZx.jpg [10]: https://i.imgur.com/fSXmjKS.jpg [11]: https://i.imgur.com/FaXNBlB.jpg


  Files folder image Files (54)  
File Role Description
Files folder imageclasses (1 file)
Files folder imageimg (47 files)
Files folder imagepatterns (3 files)
Accessible without login Plain text file exmple.php Example Example script
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file readme.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:316
This week:0
All time:7,259
This week:54Up