PHPackages                             benmajor/php-image-resize - 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. benmajor/php-image-resize

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

benmajor/php-image-resize
=========================

A simple PHP class to handle image resizing and editing.

1.1.2(6y ago)256.2k8MITPHPPHP &gt;= 5.6.0

Since May 10Pushed 3y ago3 watchersCompare

[ Source](https://github.com/benmajor/PHP-Image-Resize)[ Packagist](https://packagist.org/packages/benmajor/php-image-resize)[ RSS](/packages/benmajor-php-image-resize/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)DependenciesVersions (6)Used By (0)

PHP ImageResize
===============

[](#php-imageresize)

ImageResize is a simple PHP class that can be used to resize images on the fly using PHP's native [GD library](http://php.net/manual/en/book.image.php). The library is also able to add watermarks and text overlays to your images automatically.

The only dependency for this Class is that the GD library be installed on your server. You must be running **PHP &gt;= 5.6**.

[![Latest Version](https://camo.githubusercontent.com/0e7f40d887583c3c8307865e6dcb735f18e5eed9cff64a8572ade3cf02c85a97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f62656e6d616a6f722f7068702d696d6167652d726573697a652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/benmajor/php-image-resize)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Table of Contents:
------------------

[](#table-of-contents)

1. [Version History](#1-version-history)
2. [Installation](#2-installation)
3. [Getting Started](#3-getting-started)
4. [Image Method Reference](#4-image-method-reference)
5. [Text Method Reference](#5-text-method-reference)
6. [Watermark Method Reference](#6-watermark-method-reference)
7. [Requirements](#7-requirements)
8. [Bugs &amp; Features](#8-bugs-features)
9. [License](#9-license)

1. Version History:
-------------------

[](#1-version-history)

- **Version 1.1.0** (2018-05-13)

    - Added text overlay support
    - Added watermark support
    - Added `getAverageColor()` method to `Image`.
    - Minor bug fixes
- **Version 1.0.0** (2018-05-09)

    - The library was officially launched and added to Github, Packagist and Composer.

2. Installation:
----------------

[](#2-installation)

The easiest way to install the library is using [Composer](https://getcomposer.org/):

```
$ composer require benmajor/php-image-resize

```

Or simply download the PHP package from the `src/` directory in this repository.

3. Getting Started:
-------------------

[](#3-getting-started)

To get started, call the constructor, and pass a path to a valid image to it:

```
