PHPackages                             byjg/imageutil - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Image &amp; Media](/categories/media)
4. /
5. byjg/imageutil

ActiveLibrary[Image &amp; Media](/categories/media)

byjg/imageutil
==============

ImageUtil is a PHP library that provides a collection of operations for image manipulation using the GD library. It simplifies tasks such as flipping, cropping, resizing, stamping, and more.

6.0.0(7mo ago)1310.1k↓22%11MITPHPPHP &gt;=8.3 &lt;8.6CI failing

Since May 27Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/byjg/php-imageutil)[ Packagist](https://packagist.org/packages/byjg/imageutil)[ GitHub Sponsors](https://github.com/byjg)[ RSS](/packages/byjg-imageutil/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (3)Versions (14)Used By (1)

   sidebar\_key imageutil   tags    php

 image

    Image Manipulation Library
==========================

[](#image-manipulation-library)

ImageUtil is a PHP library that provides a collection of operations for image manipulation using the GD library. It simplifies tasks such as flipping, cropping, resizing, stamping, and more.

[![Sponsor](https://camo.githubusercontent.com/fab14b7f7f475072ada0473f193d6f322561fd4a2958e0cc89910d053347cf27/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f53706f6e736f722d2532336561346161613f6c6f676f3d67697468756273706f6e736f7273266c6f676f436f6c6f723d7768697465266c6162656c436f6c6f723d306431313137)](https://github.com/sponsors/byjg)[![Build Status](https://github.com/byjg/php-imageutil/actions/workflows/phpunit.yml/badge.svg?branch=master)](https://github.com/byjg/php-imageutil/actions/workflows/phpunit.yml)[![Opensource ByJG](https://camo.githubusercontent.com/425c1bbccc0f292bf4d20569ae74a6b2e384fd648f1af8911bc61de9a8dcfc0b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6f70656e736f757263652d62796a672d737563636573732e737667)](http://opensource.byjg.com)[![GitHub source](https://camo.githubusercontent.com/88e61eb211719144efdd570290a0456b6e13099c2df8d973f1bb43fe33bf0039/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4769746875622d736f757263652d696e666f726d6174696f6e616c3f6c6f676f3d676974687562)](https://github.com/byjg/php-imageutil/)[![GitHub license](https://camo.githubusercontent.com/7d46be2e5144937424662478ecd339cc12a56fb1ddca4484241514e2729f72ba/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f62796a672f7068702d696d6167657574696c2e737667)](https://opensource.byjg.com/opensource/licensing.html)[![GitHub release](https://camo.githubusercontent.com/a6b604ad58e9dd09f19367ce3c70516e43d29e33908177d1809c8ba0bac4826c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f62796a672f7068702d696d6167657574696c2e737667)](https://github.com/byjg/php-imageutil/releases/)

Installation
------------

[](#installation)

To install ImageUtil, use the following composer command:

```
composer require "byjg/imageutil"
```

Supported Formats
-----------------

[](#supported-formats)

ImageUtil supports the following image formats:

- GIF
- JPEG
- PNG
- BMP
- WEBP
- SVG (Partial support. Primarily for converting SVG to other formats, not for SVG manipulation.)

Creating an Image
-----------------

[](#creating-an-image)

You can create an image from a file, URL, existing resource, or create an empty image:

```
