PHP Classes

GD2 Imaging: Deskew and apply other advanced image effects

Recommend this page to a friend!
  Info   Example   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 62%Total: 1,595 All time: 2,463 This week: 54Up
Version License PHP version Categories
gd2-imaging 1.7.4GNU Lesser Genera...5.2PHP 5, Graphics
Description 

Author

This class can apply several types of advanced image processing effects. Currently it can:

* Use the Hough transform to detect skew angles and deskew an image
* Detect the background color of an image
* Perform image quantization basic text recognition (OCR) in an image to eventually read text used for CAPTCHA validation
* Apply the pastel effect on an image
* Crop an image preserving the image aspect
* Remove a noise from an image
* Rotate or rescale an image detecting its background color
* Generate an histograms for an image
* Calculate pixel luminance (intensity), hue, saturation and chromacity of the RGB colors in three different color modes (HSL, HSI, HSV)
* Change hue of the image
* Change luminance of the image
* Change saturation of the image
* Create High-Definition-Range (HDR) images
* Use advanced programmable Pixel Shader
* Merge two images using eight different blending modes:
- addition
- divide
- subtract
- darken
- lighten
- difference
- multiply
- opacity
* Apply experimental blur effect with customizable kernel size.

Innovation Award
PHP Programming Innovation award nominee
November 2011
Number 2


Prize: One downloadable copy of PhpED Professional
PHP can use the GD library to provide basic image manipulation functions.

This class goes further and implements additional advanced image manipulation functions in pure PHP.

Manuel Lemos
Picture of Artur Graniszewski
  Performance   Level  
Name: Artur Graniszewski is available for providing paid consulting. Contact Artur Graniszewski .
Classes: 14 packages by
Country: Poland Poland
Age: 42
All time rank: 2874 in Poland Poland
Week rank: 195 Up2 in Poland Poland Up
Innovation award
Innovation award
Nominee: 7x

Winner: 1x

Example

<?php

require_once('../gd2imaging.php');

$image = new Image('hawaii.jpg');
// Luminance set to 140%
$image->setLuminance(1.4);
// Color saturation set to 220%
$image->setSaturation(2.2);
$image->show();


Screenshots (10)  
  • noise_reduction.png
  • ocr_text_recognition.png
  • auto_deskewing.png
  • ocr_captcha_reader.PNG
  • pastelization.png
  • skew_detection.png
  • background_color.png
  • histogram.png
  • hue_rotation.jpg
  • vibrant_colors.jpg
  Files folder image Files (40)  
File Role Description
Files folder imagedocumentation (9 files)
Files folder imageexamples (19 files)
Plain text file gd2imaging.php Class Main class source.
Accessible without login Plain text file license.txt Lic. LGPL license file.

  Files folder image Files (40)  /  documentation  
File Role Description
  Accessible without login HTML file _gd2imaging.php.html Doc. Documentation [MAIN FILE]
  Accessible without login HTML file Image.html Doc. Documentation: Image class
  Accessible without login HTML file Vector.html Doc. Documentation: Vector class
  Accessible without login HTML file Quantizator.html Doc. Documentation: Quantizator class
  Accessible without login HTML file Color.html Doc. Documentation: Color class
  Accessible without login HTML file Dimensions.html Doc. Documentation: Dimensions class
  Accessible without login HTML file Point.html Doc. Documentation: Point class
  Accessible without login HTML file Channel.html Doc. Documentation: Channel class
  Accessible without login Plain text file stylesheet.css Data Stylesheet

  Files folder image Files (40)  /  examples  
File Role Description
  Accessible without login Plain text file index.php Example Example script
  Accessible without login Plain text file deskew.php Example Misc file.
  Accessible without login Plain text file histogram.php Example Misc file.
  Accessible without login Plain text file hsv.php Example Misc file.
  Accessible without login Plain text file hue.php Example Misc file.
  Accessible without login Plain text file noise_reduction.php Example Misc file.
  Accessible without login Plain text file rotation.php Example Misc file.
  Accessible without login Image file alphabet.png Data Misc file.
  Accessible without login Image file bird.png Photo Misc file.
  Accessible without login Image file blue.png Photo Misc file.
  Accessible without login Image file captcha.gif Photo Misc file.
  Accessible without login Image file hawaii.jpg Photo Misc file.
  Accessible without login Image file noise.PNG Photo Misc file.
  Accessible without login Image file plain.jpg Photo Misc file.
  Accessible without login Image file test3.PNG Photo Misc file.
  Accessible without login Image file test4.PNG Photo Misc file.
  Accessible without login Image file text.png Data Misc file.
  Accessible without login Image file arrow.png Data Misc file.
  Accessible without login Image file loading.gif Data Misc file.

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 Reuses Unique User Downloads Download Rankings  
 0%1
Total:1,595
This week:0
All time:2,463
This week:54Up
 User Ratings  
 
 All time
Utility:80%StarStarStarStarStar
Consistency:80%StarStarStarStarStar
Documentation:70%StarStarStarStar
Examples:75%StarStarStarStar
Tests:-
Videos:-
Overall:62%StarStarStarStar
Rank:903