PHP 5.3 Object Oriented image manipulation library

Related tags

Laravel Imagine
Overview

Imagine

PHPUnit Coding Style

Tweet about it using the #php_imagine hashtag.

Image manipulation library for PHP 5.3 inspired by Python's PIL and other image libraries.

Requirements

The Imagine library has the following requirements:

  • PHP 5.3+

Depending on the chosen Image implementation, you may need one of the following PHP extensions:

  • GD2
  • Imagick (with ImageMagick version 6.2.9 or later, except version 7.0.7-32)
  • Gmagick

To read EXIF metadata (e.g. for autorotation), activate the PHP exif extension. This is optional: Imagine works without the PHP exif extension, but then it can't read and act on image orientation or other EXIF metadata.

Installation using composer

php composer.phar require imagine/imagine

Basic Principles

The main purpose of Imagine is to provide all the necessary functionality to bring all native low level image processing libraries in PHP to the same simple and intuitive OO API.

Several things are necessary to accomplish that:

  • Image manipulation tools, such as resize, crop, etc.
  • Drawing API - to create basic shapes and advanced charts, write text on the image
  • Masking functionality - ability to apply black&white or grayscale images as masks, leading to semi-transparency or absolute transparency of the image the mask is being applied to

The above tools should be the basic foundation for a more powerful set of tools that are called Filters in Imagine.

Some of the ideas for upcoming filters:

  • Charting and graphing filters - pie and bar charts, linear graphs with annotations
  • Reflection - apple style
  • Rounded corners - web 2.0

Documentation

Presentations

Articles

Contributing

Branches

New pull requests should be based on the develop branch. The master branch is the stable branch: it usually matches the latest a release but in can be a bit ahead.

Test groups

Some PHPUnit test is marked as skipped (for example, tests that require a driver that support multiple layers and executed with the GD driver). In addition, if you don't have installed gmagick, the gmagick tests will be marked as skipped.

If you don't want to run tests that are marked as "always skipped" you can tell PHPUnit to exclude the always-skipped group. The same for the tests that require a specific driver (gd, imagick, imagick).

So, for example, to exclude the always-skipped and the gmagick tests, you can launch phpunit with this command options:

composer run test -- --exclude-group always-skipped,gmagick

Development environment

Setting up an environment with all the required libraries may be very hard. In order to run the tests locally, you can use the same docker images used by Imagine to test the pull requests.

For example, if you have Imagine locally in the /home/me/imagine folder, you can run tests for PHP 8.1 with the GD and Imagick with this very simple approach:

  1. Launch a temporary docker container with:
    docker run --rm -it -v /home/me/imagine:/app -w /app ghcr.io/php-imagine/test:8.1-gd-imagick bash
  2. Inside the docker container, run these commands:
    # Start a local web server: some tests require it
    cd tests
    php -n -S 0.0.0.0:8013 >/dev/null 2>&1 &
    cd ..
    # Tell the tests that the local web server is available at the port 8013
    export IMAGINE_TEST_WEBSERVERURL=http://localhost:8013
    # Install the composer dependencies
    composer update
    # Run the tests
    composer run test -- --exclude-group always-skipped,gmagick

Note: This approach works on Windows too: simply launch the docker container with

docker run --rm -it -v C:\Path\To\Imagine:/app -w /app ghcr.io/php-imagine/test:8.1-gd-imagick bash

Built test files

Many tests create temporary files (in the tests/tmp directory) containing built images. Those temporary files are compared with expected images, and then are deleted. If you want to keep those temporary files (for example, to check what's being built), you can set the IMAGINE_TEST_KEEP_TEMPFILES environment variable. If the IMAGINE_TEST_KEEP_TEMPFILES is configured in the GitHub Action tests, those temporary files are attached to tests as an articact.

Comments
  • Applying the canvas filter on animated GIFs

    Applying the canvas filter on animated GIFs

    This pull request enables applying the canvas filter on (layers of) an animated GIF.

    To achieve this, the following has been addressed:

    • Image delays are accessible and can be modified
      public function ImageInterface#setDelay($delay) public function ImageInterface#getDelay()
      • The canvas filter is now able to copy the delay into the new ImageInterface.
    • As filters return a modified ImageInterface,
      • layers should be replacable,
        public function LayersInterface#replace($offset, ImageInterface $image)
      • which is only possible if the image's resource is available (for internal use only).
        public function ImageInterface#getResource()
      • Also, GD now saves the first (and only) layer, as it may have been replaced.
    • When working with GD layers, the GD resource is destroyed when a layer is garbage-collected (ImageInterface#__destruct()). To counteract this, I've wrapped the GD resource in a the Imagine\Gd\Gd class so it can be reused.
    opened by rjkip 40
  • Imagine\Gd\Image::thumbnail() memory usage

    Imagine\Gd\Image::thumbnail() memory usage

    When trying to create a thumbnail of a large image (3000x3000) the memory usage of my script exceeds 128MB.

    The issue seems to be because a copy of the original image is created before resizing occurs.

    I've managed to work around this by copying the thumbnail sizing logic into my own code and calling "resize" rather than "thumbnail" as it doesn't create a copy. I do not need the original image so this works for me.

    It would be useful to be able to resize an image based on thumbnail modes. Is this something that you would be interested in including? I didn't want to do the work and create a pull request before checking.

    Thanks

    bug 
    opened by noginn 31
  • Work with animated GIFs

    Work with animated GIFs

    • Animated GIFs may contain inconsistently sized frames. Coalescing this frames makes sure all frames are of the same size.
    • Previously only one frame of an animated GIF was written. To allow for animated GIFs, let Imagick write multiple, adjoined images.

    Tests included.

    NB - Contains commit from #176.

    opened by rjkip 30
  • final classes

    final classes

    Hi,

    We are using this library for our project and we came across an issue that blocks us from extending the functionality and in particular the fact that quite a few classes defined as final.

    What is the actual reason for these classes to be final?

    api 
    opened by ShurikAg 28
  • Is this project dead?

    Is this project dead?

    There is a huge amount of good PRs and an even bigger amount of issues that don't get any attention.

    Why? Is the project dead?

    I really consider switching to https://github.com/Intervention/image because of the lack of support for this lib. :(

    opened by burzum 26
  • Segmentation fault with GD on 1.3.1

    Segmentation fault with GD on 1.3.1

    Hi!

    Issue description

    Our CI tests started failing yesterday with errors similar to Failed to load resource: the server responded with a status of 502 (Bad Gateway). The logs look like this:

    web_1       | 2022-03-16T10:20:53.320977547Z 172.19.0.4 - - [16/Mar/2022:10:20:53 +0000] "POST /api/ezp/v2/user/sessions HTTP/1.1" 201 584 "-" "Symfony HttpClient/Curl" "-"
    web_1       | 2022-03-16T10:20:53.504025837Z 172.19.0.4 - - [16/Mar/2022:10:20:53 +0000] "GET /api/ezp/v2/content/objects/52/versions/1 HTTP/1.1" 200 5112 "-" "Symfony HttpClient/Curl" "-"
    web_1       | 2022-03-16T10:20:53.683592022Z 2022/03/16 10:20:53 [error] 9#9: *4 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: 172.19.0.4, server: localhost, request: "GET /api/ezp/v2/content/binary/images/52-183-1/variations/medium HTTP/1.1", upstream: "fastcgi://172.19.0.4:9000", host: "web"
    app_1       | 2022-03-16T10:20:53.688494227Z [16-Mar-2022 10:20:53] WARNING: [pool www] child 208 exited on signal 11 (SIGSEGV - core dumped) after 79.766833 seconds from start
    

    It started happening right after 1.3.0/1.3.1 has been released and it disappears when a Composer conflict with imagine/imagine:^1.3.0 is added (see: https://github.com/ezsystems/ezplatform-rest/pull/92 for a failing and passing CI build).

    What version of Imagine are you using?

    1.3.1

    What's the PHP version you are using?

    7.3

    What's the imaging library you are using [gd/imagick/gmagick/any]?

    gd

    What's the imaging library configuration

    root@1021939f0ff2:/var/www# php --ri gd
    
    gd
    
    GD Support => enabled
    GD Version => bundled (2.1.0 compatible)
    FreeType Support => enabled
    FreeType Linkage => with freetype
    FreeType Version => 2.6.3
    GIF Read Support => enabled
    GIF Create Support => enabled
    JPEG Support => enabled
    libJPEG Version => 6b
    PNG Support => enabled
    libPNG Version => 1.6.28
    WBMP Support => enabled
    XPM Support => enabled
    libXpm Version => 30411
    XBM Support => enabled
    JIS-mapped Japanese Font Support => enabled
    
    Directive => Local Value => Master Value
    gd.jpeg_ignore_warning => 1 => 1
    

    Minimal PHP code to reproduce the error:

    I don't have a reproducer yet, I am still gathering more data about this issue - I was not able to reproduce it locally, even when using the same PHP Docker image that we use on CI. I will try to extract the core dump and analyse what's happening there. I wish I had more data, but given that 1.3.x is a fresh release I think it's important to let you know that the behaviour has changed between the 1.2.x and 1.3.x releases.

    I will update this issue as soon as I have more information.

    opened by mnocon 24
  • Support webp

    Support webp

    These lines are needed to support webp with the imagick adapter.

    I don't intend to write webp support for the other adapters, but this may be a start for someone else.

    Also requested in #271

    opened by chregu 24
  • ExifMetadataReader::readFile() does not return Exif data

    ExifMetadataReader::readFile() does not return Exif data

    Issue description

    No Exif data returned when using (new ExifMetadataReader())->readFile($path) while exif_read_data($path, null, true, false) works fine.

    What version of Imagine are you using?

    1.2.2

    What's the PHP version you are using?

    7.3.11

    What's the imaging library you are using [gd/imagick/gmagick/any]?

    any

    What's the imaging library configuration

    --

    Minimal PHP code to reproduce the error:

    (new ExifMetadataReader())->readFile($path)
    
    opened by stevekr 23
  • iPad / iPhone Orientation (exif orientation tags)

    iPad / iPhone Orientation (exif orientation tags)

    When an image is uploaded directly from an iPad or iPhone without going through a computer first, the image is not properly rotated. Usually the computer will apply transformations automatically upon import, but with a direct upload the image library will need to detect these tags and rotate the image automatically.

    (sample code - http://php.net/manual/en/function.exif-read-data.php#110894)

    Any thoughts?

    feature 
    opened by AdrianSchneider 23
  • Add layers support

    Add layers support

    Hello Bulat,

    this PR proposes a support for layers. It is quite useful when you want to extract all images of an animated gif, or all layers of a photoshop file.

    I've choosen to implement the \Countable interface to count the number of frame/layer an image contains.

    GD does not support layers.

    Please give me feedback about the public API (Iv'e choosen layer over frame, what do you think about it ?). As soon as you validate it, I will add documentation so the PR will be mergeable :)

    Romain

    opened by romainneutron 22
  • Canvas filter

    Canvas filter

    This pull request implements a canvas filter that enables you to define a new canvas size, and place the current image somewhere in the new image.

    Example usage:

    $imagine = new Imagine\Imagick\Imagine();
    $image = $imagine->open('/path/to/image.png');
    
    // Apply canvas
    $image->canvas(
        // New canvas size
        new Imagine\Image\Box(200, 200),
    
        // Where to place the existing image (defaults to 0, 0)
        new Imagine\Image\Point(20, 20),
    
        // Optional background image for the regions that go outside of the existing image
        new Imagine\Image\Color('000')
    );
    
    opened by christeredvartsen 22
  • Why does Point class reject negative values...?

    Why does Point class reject negative values...?

    Issue description

    The Imagine Point class constrains point values to be positive (vis

       /**
         * Constructs a point of coordinates.
         *
         * @param int $x
         * @param int $y
         *
         * @throws \Imagine\Exception\InvalidArgumentException
         */
        public function __construct($x, $y)
        {
            if ($x < 0 || $y < 0) {
                throw new InvalidArgumentException(sprintf('A coordinate cannot be positioned outside of a bounding box (x: %s, y: %s given)', $x, $y));
            }
    
            $this->x = $x;
            $this->y = $y;
        }
    

    Why is this? Is there a work-around for positioning drawn or pasted image objects so that they are partially placed outside of an image area?

    If you disable the constraint, it appears that Imagine continues to work OK with negative values.

    What version of Imagine are you using?

    1.3.2

    What's the PHP version you are using?

    8.0.25

    What's the imaging library you are using [gd/imagick/gmagick/any]?

    GD2

    What's the imaging library configuration

    GD Version: "2.3.3" FreeType Support: true FreeType Linkage: "with freetype" GIF Read Support: true GIF Create Support: true JPEG Support: true PNG Support: true WBMP Support: true XPM Support: true XBM Support: true WebP Support: true BMP Support: true TGA Read Support: true JIS-mapped Japanese Font Support: false

    Minimal PHP code to reproduce the error:

    n/a

    opened by jcogs-design 0
  • Gd\Drawer -> ellipse

    Gd\Drawer -> ellipse

    Issue description

    This method calls this code three times (line 154, 165, 172)

            if (function_exists('imageantialias')) {
                imageantialias($this->resource, true);
            }
    

    At least two of these calls appear to be unnecessary.

    Before doing a PR to remove I thought it prudent to check whether there is a good reason for the apparently redundant calls...

    What version of Imagine are you using?

    1.3.2

    What's the PHP version you are using?

    8.0.25

    What's the imaging library you are using [gd/imagick/gmagick/any]?

    GD2

    What's the imaging library configuration

    GD Version: "2.3.3" FreeType Support: true FreeType Linkage: "with freetype" GIF Read Support: true GIF Create Support: true JPEG Support: true PNG Support: true WBMP Support: true XPM Support: true XBM Support: true WebP Support: true BMP Support: true TGA Read Support: true JIS-mapped Japanese Font Support: false

    Minimal PHP code to reproduce the error:

    n/a

    opened by jcogs-design 0
  • Is there an inverse to getGdResource()

    Is there an inverse to getGdResource()

    Issue description

    The getGdResource() method extracts the GDResource component from a GD type Image object.

    However there does not appear to be any clean way to generate or update the Image object from a GDResource type entity.

    This is unfortunate.

    If (for example) if you need to apply a process to an image for which no Image methods exist (e.g. apply an arbitrary laplacian type filter) then the only option (in GD universe) is to export the image resource, apply the process using GD primitives and then ... you are stuck. The Imagine read() method apparently only reads GD resources from disk, so it would appear to proceed with processing you need to write the partially processed image to disk and read it back again (or if that doesn't work, write out partially processed image in an image file format and create a new Image instance by reading that back again).

    A better solution would be for there to be a way to simply load a GD resource back into the Image object. ...

    What version of Imagine are you using?

    1.3.2

    What's the PHP version you are using?

    8.0.25

    What's the imaging library you are using [gd/imagick/gmagick/any]?

    GD2

    What's the imaging library configuration

    GD Version: "2.3.3" FreeType Support: true FreeType Linkage: "with freetype" GIF Read Support: true GIF Create Support: true JPEG Support: true PNG Support: true WBMP Support: true XPM Support: true XBM Support: true WebP Support: true BMP Support: true TGA Read Support: true JIS-mapped Japanese Font Support: false

    Minimal PHP code to reproduce the error:

    
    $imagine_object = new Imagine\Gd\Imagine(); // Creates new Imagine GD object
    $image_object = $imagine_object->load($image); // Creates a new Image GD object
    $gd_resource = $image_object->getGdResource();
    ... do stuff ...
    $modified_image_object = $imagine_object->read($gd_resource); // Fails... :(
    
    
    opened by jcogs-design 7
  • Unable to open remote jpg image

    Unable to open remote jpg image

    Issue description

    Unable to open remote jpg image, while the remote image does exists. No problem with png images, just jpg images.

    What version of Imagine are you using?

    1.3.2

    What's the PHP version you are using?

    7.4.29

    What's the imaging library you are using [gd/imagick/gmagick/any]?

    GD

    What's the imaging library configuration

    GD Support => enabled GD headers Version => 2.3.3 GD library Version => 2.3.3 FreeType Support => enabled FreeType Linkage => with freetype GIF Read Support => enabled GIF Create Support => enabled JPEG Support => enabled PNG Support => enabled WBMP Support => enabled XPM Support => enabled XBM Support => enabled WebP Support => enabled BMP Support => enabled TGA Read Support => enabled

    Directive => Local Value => Master Value gd.jpeg_ignore_warning => 1 => 1

    Minimal PHP code to reproduce the error:

    $imagine = new \Imagine\Gd\Imagine();
    $image = 'https://illuxi-v3.s3.amazonaws.com/virtual_event/boot/ASSTSAS-759-FR.jpg';
    $image = $imagine->open($image);
    
    opened by malanciault 1
  • curl error: 1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version

    curl error: 1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version

    Issue description

    I'm getting the following error:

    Uncaught Imagine\Exception\RuntimeException: error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version in /var/www/homesbymarco.com/vendor/imagine/imagine/src/File/Loader.php:237

    I get the error on my server running Ubuntu 18.04 with curl 7.58, but I do not get the error on my other server running Ubuntu 20.04 with curl 7.68.

    What version of Imagine are you using?

    1.3.2

    What's the PHP version you are using?

    PHP 7.2.34-28+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Nov 19 2021 06:36:36) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.2.34-28+ubuntu18.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

    What's the imaging library you are using [gd/imagick/gmagick/any]?

    gd

    What's the imaging library configuration

    php --ri gd

    gd

    GD Support => enabled GD headers Version => 2.3.0 GD library Version => 2.3.0 FreeType Support => enabled FreeType Linkage => with freetype FreeType Version => 2.8.1 GIF Read Support => enabled GIF Create Support => enabled JPEG Support => enabled libJPEG Version => 8 PNG Support => enabled libPNG Version => 1.6.34 WBMP Support => enabled XPM Support => enabled libXpm Version => 30411 XBM Support => enabled WebP Support => enabled

    Directive => Local Value => Master Value gd.jpeg_ignore_warning => 1 => 1

    Minimal PHP code to reproduce the error:

    
    $url = 'https://cdn.onebauer.media/one/empire-images/features/5665a94d329ff0ca7c62aca1/STA039DV.jpg?format=jpg&quality=80&width=850&ratio=1-1&resize=aspectfit';
    
    $imagine = new Imagine\Gd\Imagine();
    $photo = $imagine->open(new Imagine\File\Loader($url));
    
    
    opened by jetibbetts 8
Releases(1.3.3)
  • 1.3.3(Nov 16, 2022)

  • 1.3.2(Apr 1, 2022)

  • 1.3.1(Mar 15, 2022)

  • 1.3.0(Mar 15, 2022)

    • Minimum PHP supported version is now 5.5 (#820, @PowerKiKi)
    • Support AVIF, HEIC, and JXL in Imagick driver (#759, #765, @ausi)
    • Support AVIF in GD driver (#791, @mlocati)
    • Make the $filter parameter of the resize method invariant (#776, @mlocati)
    • Ability to specify the alpha-blending of the GD drawer (#790, @mlocati)
    • Add support for SINCFAST filter in Imagick driver (#823, @mlocati)
    • Fix applyMask() for GD driver (#708, @ninze)
    • Fix PHP 8.1 compatibility (#768, #791, @ausi, @mlocati)
    • Fix error handling in grayscale() for Gmagick driver (#757, @dmitry-kulikov)
    • Fix convolve() for Imagick driver (#775, @mlocati)
    • Fix array retuned by histogram() method of GD and Imagick drivers (#797, @mlocati)
    • Fix handling alpha channel in Imagick (#775, #798, @mlocati)
    • New Driver\Info classes to inspect installed drivers (#802, #805, #806, @mlocati)
    • Fix wrong load logic in Imagick (#807, @mlocati)
    Source code(tar.gz)
    Source code(zip)
  • 1.2.4(Nov 3, 2020)

    • Fix PHP 8.0 compatibility, except gmagick - see https://bugs.php.net/bug.php?id=80106 (#740, @ausi)
    • Optimize reading EXIF metadata from local files (#741, @jorrit)
    • Fix rotation with imagick (#734, @lashus @ausi)
    • Fix saving multi-layer images (eg animated GIFs) as plain images with gmagick and imagick (#746, @alexander-schranz @mlocati)
    • Fix gmagick not resolving the correct export format in some edge cases (#750, @ausi)
    Source code(tar.gz)
    Source code(zip)
  • 1.2.3(Dec 4, 2019)

    • Handle jfif extension in GD driver (#727, @sylvain-msl-talkspirit)
    • Improve detection of unsupported Exit Metadata Reader (#729, @mlocati, @ausi)
    Source code(tar.gz)
    Source code(zip)
  • 1.2.2(Jul 9, 2019)

  • 1.2.1(Jun 3, 2019)

    • Silence call to \Imagick::setImageOpacity() in order to prevent deprecation error with Imagick 3.4.4 and ImageMagick 6 (#715, @samdark, @mlocati)
    Source code(tar.gz)
    Source code(zip)
  • 1.2.0(Dec 7, 2018)

  • 1.1.0(Oct 25, 2018)

    • New ImageInterface::THUMBNAIL_FLAG_NOCLONE flag for thumbnail() to let it modify the original image instance in order to save memory (@mlocati)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.2(Oct 24, 2018)

  • 1.0.1(Sep 27, 2018)

  • 1.0.0(Sep 25, 2018)

    • New FontInterface method: wrapText - split a text into multiple lines, so that it fits a specific width (@mlocati)
      BREAKING CHANGE if you have your own FontInterface implementation, it now must implement wrapText
    • Drawer methods can now accept a thickness of zero (@mlocati)
    • Fix drawing unfilled chords with GD driver (@mlocati)
    • Fix thickness drawing of unfilled chords with Imagick and Gmagick drivers (@mlocati)
    • Fix handling of radius in circle method implementations (@mlocati)
    • The dissolve method of ColorInterface normalizes the final value of alpha (@mlocati)
      BREAKING CHANGE dissolve doesn't throw a Imagine\Exception\InvalidArgumentException anymore
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-alpha2(Sep 8, 2018)

    Changes since v1.0.0-alpha1:

    • The coalesce method of LayerInterface instances now returns the LayerInterface itself (@mlocati)
      BREAKING CHANGE if you have your own LayerInterface implementation, it now must return $this
    • The __toString method has been added to ColorInterface since all its implementations have it (@mlocati)
      BREAKING CHANGE if you have your own ColorInterface implementation, it now must implement __toString
    • New Imagick save option: optimize if set, the size of animated GIF files is optimized (@mlocati)
      NOTE Imagick requires that the image frames have the same size
    • The paste method now accepts images not fully included in the destination image (@mlocati)
      BREAKING CHANGE the paste method doesn't throw an OutOfBoundsException anymore
    • Fix handling of PNG compression in Imagick save method (@mlocati)
    • New drawer methods: rectangle and circle (@mlocati)
      BREAKING CHANGE if you have your own implementation of DrawerInterface you should add these two new methods
    • The getChannelsMaxValue method has been added to PaletteInterface (@mlocati)
      BREAKING CHANGE if you have your own PaletteInterface implementation, it now must implement this new method
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-alpha1(Aug 28, 2018)

    Changes since v0.7.1:

    • Imagine is now tested under Windows too (@mlocati)
    • Add support to webp image format (@chregu, @antoligy, @alexander-schranz)
    • Add Imagine\File\LoaderInterface that allows loading remote images with any imaging driver (@mlocati). You can use your own LoaderInterface implementation so that you can for instance use curl or any other library.
    • Fix some phpdoc issues (@mlocati)
    • flipHorizontally and flipVertically methods of GD images is now much faster on PHP 5.5+ (@mlocati)
    • Fix loading of PNG indexed images with GD (@mlocati)
    • Loading indexed images with GD is now much faster on PHP 5.5+ (@mlocati)
    • Add support to grayscale images with Gmagick (@mlocati)
    • Add support to alpha channels of Gmagick images (@mlocati)
    • Fix getColorAt method of Gmagick images (@mlocati)
    • Add getTransformations to the Autorotate filter, so that you can get the list of transformations that should be applied to an image accordingly to the EXIF metadata (@mlocati)
    • The metadata reader now doesn't throw exceptions or warnings (@lentex, @mlocati)
    • Fix documentation (@ZhangChaoWN, @Mark-H, @mlocati)
    • Fix pixel range issue with Gmagick image (@b-viguier)
    • Fix text drawer method on Windows when using relative font file paths (@mlocati)
    • Fix box font method on Windows when using relative font file paths (@mlocati)
    • Fix crash on Windows when loading an image with Imagick (@mlocati)
    • Fix generation of API documentation (@mlocati)
    • Add jpeg_sampling_factors option when saving JPEG images (Gmagick/Imagick only) (@ausi)
    • Add BMP as supported image format (@mlocati)
    • Add support to new image type constants of Imagick (@ausi)
    • Check that Imagick correctly supports profiles (@ausi)
    • Add setMetadataReader/getMetadataReader to ImagineInterface (@mlocati)
      BREAKING CHANGE if you have your own ImagineInterface implementation, it now must implement those two methods
    • Fix creating Gmagick images with alpha colors when palette doesn't support alpha (@FractalizeR)
    • Fix warning about deprecated clone method in copy method of Imagick images (@mlocati)
    • Fix copy methods of Images (the original image and its new copy are now fully detached) (@mlocati)
    • It's now possible to use clone $image as an alternative to $image->copy() (@mlocati)
    • Add support to custom classes for BoxInterface, MetadataReaderInterface, FontInterface, LoaderInterface, LayersInterface, ImageInterface (@mlocati)
      BREAKING CHANGE if you have your own ImagineInterface implementation, it now must implement the methods of ClassFactoryAwareInterface
    • Add support for pasting with alpha for GD and Imagick (@AlloVince, @mlocati)
    • Downscaling a Box until it reaches a dimension less than 1 returns a box with dimension of 1 instead of throwing an exception (@mlocati)
      BREAKING CHANGE if you relied on Box::scale throwing an exception in this case
    • New filters: BlackWhite, BorderDetection, Negation, Neighborhood (@rejinka)
    • Minor optimization of filters based on OnPixelBased (@rejinka, @mlocati)
    • Add flag to thumbnail to allow upscaling images (@vlakoff)
      NOTE the $mode argument has been renamed to $settings, and it's now an integer (but old string values are accepted for backward compatibility)
    • New filter: brightness (@lenybernard, @mlocati)
    • New filter: colvolve available for all graphics libraries except gmagick with version prior to 2.0.1RC2 (@armatronic, @mlocati)
    • Fix bug in Imagine\Image\Palette\RGB::blend() (@dmolineus, @mlocati)
    • Autoload was moved from PSR-0 to PSR-4, and code files moved from /lib/Imagine to /src (@mlocati)
    Source code(tar.gz)
    Source code(zip)
Provides an object-oriented API to generate and represent UIDs.

Uid Component The UID component provides an object-oriented API to generate and represent UIDs. Resources Documentation Contributing Report issues and

Symfony 343 Jan 5, 2023
Html-sanitizer - The HtmlSanitizer component provides an object-oriented API to sanitize untrusted HTML input for safe insertion into a document's DOM.

HtmlSanitizer Component The HtmlSanitizer component provides an object-oriented API to sanitize untrusted HTML input for safe insertion into a documen

Symfony 201 Dec 23, 2022
Object-oriented, composable, fluent API for writing validations in Laravel

Laravel Hyrule Hyrule provides an object-oriented, fluent API for building validation rules for use w/ Laravel's Validation component. This unlocks pa

Square 330 Dec 8, 2022
A Laravel package that adds a simple image functionality to any Laravel model

Laraimage A Laravel package that adds a simple image functionality to any Laravel model Introduction Laraimage served four use cases when using images

Hussein Feras 52 Jul 17, 2022
🖼️ Laravel Nova Field for uploading and cropping images using Slim Image Cropper

??️ Laravel Nova Field for uploading and cropping images using Slim Image Cropper

Marius 5 Apr 2, 2022
Manipulating Photos in Laravel with Intervention Image

This is the source code behind the Laracasts Larabit: Manipulating Photos in Laravel with Intervention Image, and features all of the files and code available in that video.

Andrew Schmelyun 1 Feb 10, 2022
Laravel 9 Livewire Multiple Image Upload Example

Laravel livewire multiple image upload; Through this tutorial, i am going to show you how to upload multiple image using livewire in laravel apps.

Wesley Sinde 3 Feb 23, 2022
These are simple array and object collections that provide convinient methods to manipulate them.

Simple Collections These are simple array and object collections that provide convinient methods to manipulate collections; To install this package ty

Artem 4 Nov 19, 2021
Lavacharts is a graphing / charting library for PHP 5.4+ that wraps Google's Javascript Chart API.

Lavacharts 3.1.12 Lavacharts is a graphing / chart library for PHP5.4+ that wraps the Google Chart API. Stable: Dev: Developer Note Please don't be di

Kevin Hill 616 Dec 17, 2022
A laravel service provider for the netsuite-php library service

netsuite-laravel A PHP supplemental package to the ryanwinchester/netsuite-php package to add the NetSuite service client to the service container of

NetsuitePHP 6 Nov 9, 2022
PHP client library for reCAPTCHA, a free service to protect your website from spam and abuse.

reCAPTCHA PHP client library reCAPTCHA is a free CAPTCHA service that protects websites from spam and abuse. This is a PHP library that wraps up the s

Google 3.3k Dec 23, 2022
Menu Library for PHP

KnpMenu The KnpMenu library provides object oriented menus for PHP. It is used by the KnpMenuBundle for Symfony but can now be used stand-alone. Insta

KNP Labs 1.3k Jan 1, 2023
Flexihash is a small PHP library which implements consistent hashing.

Flexihash Flexihash is a small PHP library which implements consistent hashing, which is most useful in distributed caching. It requires PHP5 and uses

Paul Annesley 364 Oct 18, 2022
Geo-related tools PHP 7.3+ library built atop Geocoder and React libraries

Geotools Geotools is a PHP geo-related library, built atop Geocoder and React libraries. Features Batch geocode & reverse geocoding request(s) in seri

The League of Extraordinary Packages 1.3k Dec 27, 2022
A PHP library for simplifying the use of accessors.

Accessor A PHP library for simplifying the use of accessors. Usage use Doctrine\ORM\Mapping as ORM; use Phine\Accessor\AccessorTrait; use Phine\Access

KHerGe - Archived Projects 5 May 14, 2020
A small PHP library for validating VAT identification numbers (VATINs).

VATIN A small PHP library for validating VAT identification numbers (VATINs). Installation This library is available on Packagist: $ composer require

David de Boer 128 Oct 27, 2022
Laravel Package for TMDB ( The Movie Database ) API. Provides easy access to the wtfzdotnet/php-tmdb-api library.

Laravel Package for TMDB API Wrapper A Laravel package that provides easy access to the php-tmdb/api TMDB (The Movie Database) API wrapper. This packa

PHP - The Movie Database 151 Nov 1, 2022
Library to intercept PHP includes

Library to intercept and dynamically transform PHP includes. Forked from icewind1991/interceptor.

Nikita Popov 68 Sep 15, 2022
Laravel breeze is a PHP Laravel library that provides Authentication features such as Login page , Register, Reset Password and creating all Sessions Required.

About Laravel breeze To give you a head start building your new Laravel application, we are happy to offer authentication and application starter kits

null 3 Jul 30, 2022