Skip to content

Releases: oscarotero/imagecow

1.4.1

20 Aug 11:32

Choose a tag to compare

  • Fixed a bug using float values
  • Normalize the use of constants in Image::transform(). For example crop(200, 400, Image::CROP_ENTROPY) is represented as crop,200,400,CROP_ENTROPY.

1.4.0

18 Aug 14:32

Choose a tag to compare

  • Use of constants to define the library to use (but you can keep using the strings "Gd", "Imagick"):
    php $image = Image::create('my-image.jpg', Image::LIB_IMAGICK);

  • The method Imagecow\Image::resize() accepts a fourth argument to resize the image using the smallest value instead the biggest. It's similar to css background-size: contain and background-size: cover. Example:

    //load an image of 400x200px
    $image = Imagecow\Image::create('image.jpg');
    
    $image->resize(100, 100, false); //the result is an image of 100x50px
    $image->resize(100, 100, false, true); //the result is an image of 200x100px
  • The use of proportions to define the position of the image on crop works like css's background-position great explained in this article

  • Implemented the constants Imagecow\Image::CROP_ENTROPY and Imagecow\Image::CROP_BALANCED to use instead x/y position in crop and resizeCrop methods. This methods are taken from stojg/crop library and only works in Imagick. For Gd there's a fallback that uses center/middle instead.

  • Improved documentation in README

1.3.1

30 Apr 08:53

Choose a tag to compare

Improved compatibility checking. Now an exeception is throwed if gd is not installed

1.3.0

25 Mar 16:10

Choose a tag to compare

New methods Image::createFromFile() and Image::createFromString() because Image::create() does not always detect right the type of source

1.2.0

29 Dec 15:03

Choose a tag to compare

  • Changed the autoload to PSR-4

1.1.0

28 May 14:28

Choose a tag to compare

  • allow GD::createFromFile to handle remote urls #13
  • Added the svgExtractor class to generate images from vector svg files.

1.0.0

19 Apr 12:45

Choose a tag to compare

  • Improved the code quality. There is a lot of internal changes
  • Added unitests and implemented travis-ci / scrutinizr
  • Changed the way to create imagecow instances. Now each instance manages only one image, so the methods "getImage", "setImage", "load" and "unload" has been removed. The new way:
use Imagecow\Image;

$image = Image::create('path/to/image-file.png', 'Imagick');
  • Use of exceptions for a better error management, so you have to put your code in a try statement.
  • Rewrited the class IconExtractor. Now it uses Imagick and changed the API.
  • Changed the way the javascript library saves the cookie for more simplicity.
  • Removed a lot of duplicated code, bugs, better documentation, etc.

0.6.0

06 Mar 10:27

Choose a tag to compare

  • Added Image::autoRotate() that rotates/flip/flop the image automatically according its EXIF data
  • Changed the coding styles to follow PSR-1 and PSR-2
  • fixed getExifData for non jpeg images
  • fixed rotate in Imagick
  • removed obsolete commets and update README with the rotate/autoRotate method

0.5.2

22 Feb 17:45

Choose a tag to compare

Resize in GD with autocalculate width or height can result in 0px. Fixed that using ceil instead floor.

0.5.1

09 Jan 10:25

Choose a tag to compare

  • Bugfixes: #8
  • Changed license to MIT
  • Added @AndreasHeiberg as a contributor
  • Removed setQuality (setCompressionQuality does the same)