Zebra_Image is an advanced, compact (one-file only), lightweight, object-oriented image manipulation library written in and for PHP.
It provides methods for performing several types of image manipulation operations.
It doesn’t require any external libraries other than the GD2 extension (with which PHP usually comes pre-compiled with).
Zebra_Image‘s code is heavily commented and generates no warnings/errors/notices when PHP’s error reporting level is set to E_ALL.
With this library you can rescale, flip, rotate and crop images.
Zebra_Image supports loading and saving images in the JPEG, GIF and PNG formats, while preserving transparency for PNG, GIF and PNG24.
The class can also resize images to exact given width and height and still maintain aspect ratio.
· PHP 4.4.9 or higher
What's New in This Release: [ read full changelog ]
· A new property is now available: png_compression, which determines the compression level of PNG files; this value of this property is ignored for PHP versions older than 5.1.2;
· A new property is now available: sharpen_images which, when enabled, will instruct the script to apply a “sharpen” filter to the resulting images; can be very useful when creating thumbnails but should be used only when creating thumbnails; the sharpen filter relies on PHP’s imageconvolution function which is available only for PHP version 5.1.0+, and will leave the images unaltered for older versions;
· Added new cropping options: TOPCENTER, TOPRIGHT, MIDDLELEFT, MIDDLERIGHT, BOTTOMLEFT, BOTTOMCENTER, BOTTOMRIGHT;
· Entire logic behind the resize method was rewritten;
· Fixed a bug where the script would generate warnings if the chmod function was disabled via PHP configuration options; now it will not generate the warning but instead will set a value for the script’s error property;
· Fixed a bug where if one would resize a transparent image and in the process would convert it to a JPEG (no transparency) and the resize method’s background_color argument was set to -1, the resulted image’s background color would be black; now it is white, as described in the documentation;