PHPackages                             stefano/stefano-image - 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. stefano/stefano-image

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

stefano/stefano-image
=====================

Image processing

0.2.1(8y ago)132BSD-3-ClausePHPPHP &gt;=7.0.0

Since Jun 15Pushed 3y ago1 watchersCompare

[ Source](https://github.com/bartko-s/stefano-image)[ Packagist](https://packagist.org/packages/stefano/stefano-image)[ Docs](https://github.com/bartko-s/stefano-image)[ RSS](/packages/stefano-stefano-image/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

Stefano Image
=============

[](#stefano-image)

[![Build Status](https://camo.githubusercontent.com/25be7c11ef277468fc7be37ea4ad2b714a53f8259387d11db9253e9c979336da/68747470733a2f2f6170702e7472617669732d63692e636f6d2f626172746b6f2d732f73746566616e6f2d696d6167652e7376673f6272616e63683d6d6173746572)](https://app.travis-ci.com/bartko-s/stefano-image)[![Coverage Status](https://camo.githubusercontent.com/52a211fc61cce5772cdfd6a3adb812eaf4ff8a9f655709f638e468540c62563a/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f626172746b6f2d732f73746566616e6f2d696d6167652f62616467652e706e673f6272616e63683d6d6173746572)](https://coveralls.io/r/bartko-s/stefano-image?branch=master)

Features
--------

[](#features)

- Resize and save image
- Add watermark
- Supported input and output format jpg, png, gif

Dependencies
------------

[](#dependencies)

- php GD2 extension

Instalation using Composer
--------------------------

[](#instalation-using-composer)

1. Run command `composer require stefano/stefano-image`

Usage
-----

[](#usage)

This is the original image

[![](./doc/images/source.jpeg)](./doc/images/source.jpeg)

- resize and keep source image aspect ration

```
$maxWidth = 200;
$maxHeight = 200;
$resizer = new \StefanoImage\Image();
$resizer->sourceImage($sourceImage)
        ->resize($maxWidth, $maxHeight)
        ->save($outputDir, $name);

```

This is the output

[![](./doc/images/resize.jpeg)](./doc/images/resize.jpeg)

- adaptive resize

```
$width = 200;
$height = 50;
$resizer = new \StefanoImage\Image();
$resizer->sourceImage($sourceImage)
        ->adaptiveResize($width, $height)
        ->save($outputDir, $name);

```

This is the output

[![](./doc/images/adaptive-resize.jpeg)](./doc/images/adaptive-resize.jpeg)

- pad

```
$width = 200;
$height = 200;
$resizer = new \StefanoImage\Image();
$resizer->sourceImage($sourceImage)
        ->pad($width, $height)
        ->save($outputDir, $name);

```

This is the output

[![](./doc/images/pad.jpeg)](./doc/images/pad.jpeg)

- pad and change background color

```
$width = 350;
$height = 150;
$resizer = new \StefanoImage\Image();
$resizer->sourceImage($sourceImage)
        ->pad($width, $height)
        ->backgroundColor(35, 210, 240)
        ->save($outputDir, $name);

```

This is the output

[![](./doc/images/pad-2.jpeg)](./doc/images/pad-2.jpeg)

- add watermark

```
$maxWidth = 350;
$maxHeight = 150;
$maxWidthPercent = 40;
$maxHeightPercent = 40;
$opacity = 30;
$watermarkPosition = \StefanoImage\Image::WATERMARK_POSITION_TOP_RIGHT;
$resizer = new \StefanoImage\Image();
$resizer->sourceImage($sourceImage)
        ->resize($maxWidth, $maxHeight)
        ->addWatermark($watermark, $maxWidthPercent, $maxHeightPercent, $opacity, $watermarkPosition)
        ->save($outputDir, $name);

```

This is the output

[![](./doc/images/watermark.jpeg)](./doc/images/watermark.jpeg)

- change output format

```
$resizer->outputFormat(\StefanoImage\Image::OUTPUT_FORMAT_PNG);

```

- change output quality

```
$resizer->quality(15);

```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 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

Every ~410 days

Total

5

Last Release

3073d ago

PHP version history (2 changes)0.0.1PHP &gt;=5.3.0

0.2.0PHP &gt;=7.0.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/12da8e2ce2685d50df256c7d302dff9de0eeab90057103170ec1c840d26eed19?d=identicon)[Stefano123](/maintainers/Stefano123)

---

Top Contributors

[![bartko-s](https://avatars.githubusercontent.com/u/675883?v=4)](https://github.com/bartko-s "bartko-s (76 commits)")

---

Tags

imageresizewatermarkpadadaptive resize

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/stefano-stefano-image/health.svg)

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

###  Alternatives

[intervention/image

PHP Image Processing

14.3k194.3M2.2k](/packages/intervention-image)[sybio/image-workshop

Powerful PHP class using GD library to work easily with images including layer notion (like Photoshop or GIMP)

860918.1k11](/packages/sybio-image-workshop)[intervention/image-laravel

Laravel Integration of Intervention Image

1496.5M102](/packages/intervention-image-laravel)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)[coldume/imagecraft

A reliable and extensible PHP image manipulation library

10133.7k2](/packages/coldume-imagecraft)[bodom78/kohana-imagefly

Create resized / cropped images directly through url parameters.

5517.0k](/packages/bodom78-kohana-imagefly)

PHPackages © 2026

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