stefangabos/Zebra_Image
A single-file lightweight PHP library designed for efficient image manipulation featuring methods for modifying images and applying filters
13 Releases
Latest: 1y ago
3.0.0Latest
📋 Changes
- added namespace - see [#31](https://github.com/stefangabos/Zebra_Image/issues/31); thanks [Marcus Nyberg](https://github.com/mce1978) for suggesting
- the library automatically sets `gd.jpeg_ignore_warning` but now this is also mentioned in the [docs](https://stefangabos.github.io/Zebra_Image/Zebra_Image/Zebra_Image.html#method__construct)
- updated the minimum required PHP version to `5.3.0`
2.8.2
📋 Changes
- added support for BMP; see [#27](https://github.com/stefangabos/Zebra_Image/issues/27); thanks [icret](https://github.com/icret) for suggesting
- fixed some issues with WEBP images
2.8.1
📋 Changes
- fixed an issue where in PHP 8 the script would break with certain GIF images; see [#26](https://github.com/stefangabos/Zebra_Image/issues/26) - thank you [Marcus Nyberg](https://github.com/mce1978) for reporting!
- fixed issue where animated WEBP images would break the script; animated WEBP images are not (yet) supported by GD; thanks to [Yani](https://github.com/yani) for reporting this one - see [#25](https://github.com/stefangabos/Zebra_Image/issues/25)
2.8.0
📋 Changes
- fixed potential warning when dealing with bad EXIF information; see [#24](https://github.com/stefangabos/Zebra_Image/pull/24); thank you [userlond](https://github.com/userlond) for the fix!
- fixed a bug with `WEBP` images in PHP version lower than 7.0.1
- fixed a potential bug when using `ZEBRA_IMAGE_BOXED` or `ZEBRA_IMAGE_NOT_BOXED` methods when resizing
- lots of minor bug fixes and source code formatting because we are now using [PHPStan](https://github.com/phpstan/phpstan) for static code analysis and [PHP CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer) for detecting coding standards violations, which are now [PSR12](https://www.php-fig.org/psr/psr-12/)-ish with a few of the rules excluded
2.7.0
📋 Changes
- fixed an issue where starting with PHP 8.0 GdImage class objects replace GD image resources; see [here](https://php.watch/versions/8.0/gdimage)
- fixed an issue where starting with PHP 8.1 sending a float value as width/height arguments instead of an interger would trigger a warning; see [here](https://php.watch/versions/8.1/deprecate-implicit-conversion-incompatible-float-string)
2.6.0
📋 Changes
- added sport for the WEBP format
- handle GD bug where transparency is lost when rotating at angles of 90, 180 and 270 degrees
- fixed [#22](https://github.com/stefangabos/Zebra_Image/issues/22); thanks to [Almir Neto](https://github.com/AlmirNeeto99) for reporting!
2.5.0
📋 Changes
- fixed bug introduced in previous release because of the new argument added to the crop method
- progressive JPEGs can now be saved by setting the newly added [jpeg_interlace](https://stefangabos.github.io/Zebra_Image/Zebra_Image/Zebra_Image.html#var$jpeg_interlace) property; thanks [tohizma](https://github.com/tohizma) for suggesting!
2.4.0
📋 Changes
- added the `background_color` argument to the [crop()](https://stefangabos.github.io/Zebra_Image/Zebra_Image/Zebra_Image.html#methodcrop) method; used when the cropping coordinates are off-scale (negative values and/or values greater than the image's size) to fill the remaining space; see #18; thank you [Thomas Skerbis](https://github.com/skerbis)!
2.3.0
📋 Changes
- the default value of the "background_color" argument of the "resize" method is now -1 (for preserving transparency)
- fixed bug where saving to gif would lose transparency
- fixed transparency not being preserved when rotating PNG images
- fixed warnings shown when the target file was a gif but the source file was not
- memory is freed after images are written
2.2.7
📋 Changes
- fixed a bug where the script would generate a warning if `auto_handle_exif_orientation` was `TRUE` and the image in case was not a JPEG; thanks to @Hoffi1, see #11
- fixed a bug where resizing transparent images to a format not supporting transparency, while having the `enlarge_smaller_images` attribute set to `TRUE` would lead to unexpected background colours for the resulting images
2.2.6
📋 Changes
- minor source code tweaks
- unnecessary files are no more included when downloading from GitHub or via Composer
- documentation is now available in the repository and on GitHub
- the home of the library is now exclusively on GitHub
Version 2.2.5 released2.2.5
📋 Changes
- use the newly added auto_handle_exif_orientation property for auto fixing image rotation if EXIF information is available; requires PHP to be configured with exif-support via --enable-exif (or, for Windows user, by enabling the php_mbstring.dll and php_exif.dll extensions); thanks to Sebi Popa
Version 2.2.4 released2.2.4
📋 Changes
- better integration with composer; thanks to Richard Griffith
- dropped support for PHP4; the library now requires PHP5+
