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

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

php-quickorm/image-resize
=========================

A library implemented by PHP to resize image and add water mark

v1.0(7y ago)123MITPHP

Since Feb 15Pushed 7y ago1 watchersCompare

[ Source](https://github.com/php-quickorm/ImageResize)[ Packagist](https://packagist.org/packages/php-quickorm/image-resize)[ RSS](/packages/php-quickorm-image-resize/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

PHP ImageResize Library
=======================

[](#php-imageresize-library)

What is it
----------

[](#what-is-it)

A library implemented by PHP to **resize image smartly** and add water mark.

This library will help you resize the image according to the width and height defined and cut smartly to promise the length-to-width ratio, and add water mark in the mean time.

Requirements
------------

[](#requirements)

- PHP 5 +
- PHP GD
- composer

> Please assure that you have installed php-gd, and install it via `apt install php7.0-gd` or `apt install php5-gd` is recommended.

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

[](#installation)

Here are two ways to install:

- Using composer:

    ```
    composer require php-quickorm/image-resize

    ```
- or download the `ImageResize.php` to your project and import it by `require "ImageResize.php";`

Usage
-----

[](#usage)

### Resize

[](#resize)

```
// Resize the firework.jpg to 800x600
$a = new ImageResize(realpath('firework.jpg'),800,600);

// Save to firework2.png;
$a->save("firework.png");

// or send as HTTP response
$a->render();
```

### Water Mark

[](#water-mark)

```
// Resize the firework.jpg to 800x600
$a = new ImageResize(realpath('firework.jpg'),800,600);

/*
* Add text to image
* The font size is 1 - 5 and the position only supports bottom-left, bottom-right, top-left, top-right
*/

// use font size 5, color #ffffff and place at bottom-right with margin 10px
$a->addTextMark("Author:Rytia", 5, "#ffffff", "right", "bottom",10);
// use font size 4, color #ccccc and place at bottom-left with margin 15px
$a->addTextMark("Blog:www.zzfly.net", 4, "#cccccc", "left", "bottom",15);

/*
* Add water mark to image
* The position only supports bottom-left, bottom-right, top-left, top-right
*/
$a->addImageMark(realpath('mark.jpg'),100,80,"right","bottom",50);

// Save to firework2.png;
$a->save("firework.png");

// or send as HTTP response
$a->render();
```

[![img](https://camo.githubusercontent.com/5605842db4b6e1daa73ab1f6c0d207dc9e017538f028835061b8e92ed7615088/687474703a2f2f7778342e73696e61696d672e636e2f6c617267652f64336561313062646779316730357a6f33747666626a3231316530346e337a342e6a7067)](https://camo.githubusercontent.com/5605842db4b6e1daa73ab1f6c0d207dc9e017538f028835061b8e92ed7615088/687474703a2f2f7778342e73696e61696d672e636e2f6c617267652f64336561313062646779316730357a6f33747666626a3231316530346e337a342e6a7067)

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2694d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/cdd090dbe3975932cec15b36e0b0d2ccc4760838969fde448ea440d0e75c31e4?d=identicon)[Rytia](/maintainers/Rytia)

---

Top Contributors

[![zzfly256](https://avatars.githubusercontent.com/u/7760268?v=4)](https://github.com/zzfly256 "zzfly256 (5 commits)")

---

Tags

image-resizeimageresizephpphp-image-resizerphp-image-watermarkerwatermark

### Embed Badge

![Health badge](/badges/php-quickorm-image-resize/health.svg)

```
[![Health](https://phpackages.com/badges/php-quickorm-image-resize/health.svg)](https://phpackages.com/packages/php-quickorm-image-resize)
```

###  Alternatives

[goat1000/svggraph

Generates SVG graphs

135911.1k3](/packages/goat1000-svggraph)[gravatarphp/gravatar

Gravatar URL builder which is most commonly called as a Gravatar library

16653.6k2](/packages/gravatarphp-gravatar)[rsoury/wp-imgix

Rewrites WordPress image URLs to use ImgIX

167.2k](/packages/rsoury-wp-imgix)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
