[TOC]
Intervention Image 3 has been rewritten from the ground up with very little code carried over from the previous version. This means a more modern and sophisticated architecture and API that takes advantage of the modern features of PHP 8+. There are a few key features that further improve the library.
- Support of animated GIF with GD and Imagick drivers
- Support for colorspaces
- Support for text wrapping in font system
- Support for line height in font system
- Object for encoded images
- canvas() is now handled by create()
- circle() is now handled by drawCircle()
- crop() still exists but has a new signature
- ellipse() is now handled by drawEllipse()
- line() has been replaced by drawLine()
- pixel() is handled by drawPixel()
- encode() still exists but has a new signature
- exif() is now handled by exif() with a different signature
- fill() currently only supports color values
- filter() is now handled by modify()
- The resizing methods resize(), fit(), widen() and heighten() have been completely rebuild and are now handled by resize(), resizeDown, scale(), scaleDown(), cover(), coverDown(), pad() and contain()
- flip() still exists but has a new signature and is handled by flip() and flop()
- insert() has been replaced by place()
- make() has been replaced by read()
- mime() is now handled by an encoded image only
- pickColor() has a different signature without format which is handled by the color class
- polygon() is handled by drawPolygon()
- rectangle() is handled by drawRectangle()
- text() still exists but has a new signature
- resizeCanvas() still exists but has a new signature
- limitColors() is handled by reduceColors
- trim() exists as of version
3.6
, but works differently and automatically removes border areas of the image with similar colors. - getCore() is replaced with core() but behaves completely differently
- colorize() no longer exists
- interlace() no longer exists
- backup() and reset() no longer exist but the functionality can be achieved more easily with native object cloning
- basepath() no longer exists
- cache() no longer exists
- filesize() no longer exists
- iptc() no longer exists
- mask() no longer exists
- opacity() no longer exists
- orientate() no longer exists and is handled automatically
- psrResponse() no longer exists
- response() no longer exists
- stream() no longer exists but you may use toFilePointer()
-
The caching library of Intervention Image 2 is not supported by the new version.
-
The service providers for the Laravel framework were removed to avoid a dependency to the framework and to highlight Intervention Image rather framework agnostic, which it always was. However, there is an official package for Laravel integration
-
It is no longer possible to create images from an URI directly. The data must first be loaded by a dedicated HTTP client and then passed to the image library. Intervention Image is not responsible for HTTP client operations.
-
It is no longer possible to pass color values as array.