PHP Classes

PHP Image Filter GD: Apply image effect filters to remote images

Recommend this page to a friend!
  Info   Documentation   Screenshots   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2026-07-19 (3 days ago) RSS 2.0 feedNot enough user ratingsTotal: 299 All time: 7,428 This week: 524Up
Version License PHP version Categories
image-filter 2.2Custom (specified...7.2PHP 5, Graphics
Description 

Author

This class can apply image effect filters to remote images.

It can take the path of an image and retrieve it to create a true color GD image resource.

The class can apply several image filtering effects and save the result back to a PNG file or serve it as the output of the current script.

Currently it can apply the following image filtering effects:

- Brighten to lighten a darker image
- Brush to adds a slight dabbed, brushed effect
- Darken an overly bright image
- Edge detect to highlights borders between colors on an image, similar to emboss
- Emboss to adds a stamped metal effect
- Flip an image vertically
- Gray scale to convert color image to black and white
- Larger to increase the image dimensions by 2 times
- Mirror to produces a mirrored reflection
- Negative to produces a photo negative
- Pixelate an image
- Sephia to add an aged photo effect
- Sharpen a blurred image
- Sketch to add a sketched, comic book effect
- Smaller to reduce the image dimensions by 2 times
- Smooth to slightly blur an overly sharpened image

Picture of Mike Jordan
  Performance   Level  
Name: Mike Jordan <contact>
Classes: 6 packages by
Country: United States United States
Age: 63
All time rank: 1460221 in United States United States
Week rank: 195 Up19 in United States United States Up
Innovation award
Innovation award
Nominee: 2x

Winner: 1x

Documentation

App: Image Filter GD Version: 2.0 Author: MT Jordan <mtjo62@gmail.com> Copyright: 2026 License: MIT ********************************************************************************** Image Filter GD: Image class to apply effects filters to local and remote images ********************************************************************************** Image Filter GD is PHP class that can apply image effects filters to local and remotely linked images. The class is applied using a JavaScript function or called directly. brighten: Lightens a darker image. brush: Adds a slight dabbed, brushed effect to an image. darken: Darkens an overly bright image. edgedetect: Highlights borders between colors on an image. Similar to emboss. emboss: Adds a stamped metal effect to an image. flip: Flips an image vertically. grayscale: Converts color image to black & white. larger: Increase an image dimension by 2x. mirror: Produces a mirrored reflection of an image. negative: Produces a photo negative of an image. pixelate: Pixilates an image. sephia: Adds an aged photo effect to an image. sharpen: Sharpens an blurred image. sketch: Adds a sketched, comic book effect to an image. smaller: Reduces an image's dimension size by half. smooth: Slightly blurs an overly sharpened image. ********************************************************************************* Image Filter GD Features: * Effects filters are non destructive to original image. Image Filter GD Restrictions: * Only supports GIF, PNG and JPG/JPEG images. * Only the first frame of animated GIFs are processed. Image Filter GD Requirements: * PHP 7.2+ * Enabled GD extension * Enabled fopen wrappers or cURL extension ********************************************************************************* Installation: 1. Upload imageFilter.php and image_filter.js to a readable directory. ********************************************************************************* For a standalone img tag Usage: <img src="http://mysite.com/path/to/imageFilter.php?file=http://mysite.com/path/to/image.png&filter=sharpen" alt=""> ********************************************************************************* Using the image_filter.js file with a class name filter and a data attribute as the effect filter Note: See filter.html for working example Open image_filter.js and edit the url variable to: http://mysite.com/path/to/imageFilter.php Add the following script include to the footer of your page or template: <script src="http://mysite.com/path/to/image_filter.js"></script> Usage: <img src="http://mysite.com/path/to/image.png" class="filter-gd" data-filter="sharpen" alt="">

Screenshots (2)  
  • demo.jpg
  • robot.jpg
  Files folder image Files (8)  
File Role Description
Accessible without login HTML file filter.html Doc. Example HTML file
Plain text file imageFilter.php Class Class source
Accessible without login Plain text file image_filter.js Data Demo Javascript file that handles DOM functions
Accessible without login Plain text file license.txt Lic. zlib/libpng License
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file readme.txt Doc. Installation and Description

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
Downloadimage-filter-2026-07-19.zip
Downloadimage-filter-2026-07-19.tar.gz
Install with ComposerInstall with Composer
Needed packages  
Class DownloadWhy it is needed Dependency
PHP Image cURL Download .zip .tar.gz Required for cURL functions if fopen wrappers are disabled Conditional
 Version Control Unique User Downloads Download Rankings  
 75%
Total:299
This week:0
All time:7,428
This week:524Up