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

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

gozoro/image
============

A simple classes for image resizing and cropping. Used GD library.

v1.0.4(5y ago)23501MITPHPPHP &gt;=5.5.9

Since Nov 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gozoro/image)[ Packagist](https://packagist.org/packages/gozoro/image)[ Docs](https://github.com/gozoro/image)[ RSS](/packages/gozoro-image/feed)WikiDiscussions master Synced 6d ago

READMEChangelogDependenciesVersions (6)Used By (1)

image
=====

[](#image)

A simple class for image resizing and cropping. Used only GD library.

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

[](#installation)

```
	composer require gozoro/image

```

Usage
-----

[](#usage)

```
$file = "image.jpg";
$image = \gozoro\image\Image($file);
$image->resize(400, 400)->crop(200, 200)->save(); // save to image.jpg
$image->resize(400, 400)->crop(200, 200)->saveAs("image2.jpg");
```

**Using resize (portrait)**

```
$file = "image400x600.jpg"; //width:400px, height:600px
$image = \gozoro\image\Image($file);
$image->resize(200)->save(); //result image: 200x300

$image = \gozoro\image\Image($file);
$image->resize(null, 200)->save(); //result image: 133x200

$image = \gozoro\image\Image($file);
$image->resize(200, 200)->save(); //result image: 133x200
```

**Using resize (landscape)**

```
$file = "image600x400.jpg"; //width:600px, height:400px
$image = \gozoro\image\Image($file);
$image->resize(200)->save(); //result image: 200x133

$image = \gozoro\image\Image($file);
$image->resize(null, 200)->save(); //result image: 300x200

$image = \gozoro\image\Image($file);
$image->resize(200, 200)->save(); //result image: 200x133
```

**Using copping**

```
$file = "image600x400.jpg"; //width:600px, height:400px
$image = \gozoro\image\Image($file);
$image->crop(200, 200, $x=0, $y=0)->saveAs("image200x200.jpg");
$image->cropLeft(200)->saveAs("image_left_200.jpg"); // crop(200, auto, 0, 0)
$image->cropRight(200)->saveAs("image_right_200.jpg"); // crop(200, auto, 600-200, 0)
$image->cropCenter(200)->saveAs("image_center_200.jpg"); // crop(200, auto, 200, 400)
$image->cropTop(200)->saveAs("image_top_200.jpg"); // crop(auto, 200, 0, 0)
$image->cropBottom(200)->saveAs("image_bottom_200.jpg"); // crop(auto, 200, 0, 400-200)
$image->cropSquare()->saveAs("image_square.jpg"); // crop(400, 400, 100, 0)
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity56

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 ~124 days

Total

5

Last Release

1872d ago

Major Versions

v0.0.1 → v1.0.02021-03-03

### Community

Maintainers

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

---

Top Contributors

[![gozoro](https://avatars.githubusercontent.com/u/13768280?v=4)](https://github.com/gozoro "gozoro (8 commits)")

---

Tags

imageresizecropresizingcropping

### Embed Badge

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

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

###  Alternatives

[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)[jonom/focuspoint

Smarter automatic image cropping for Silverstripe

108645.6k49](/packages/jonom-focuspoint)[ctessier/nova-advanced-image-field

An advanced image field for Nova with cropping and resizing.

103548.4k1](/packages/ctessier-nova-advanced-image-field)[jbzoo/image

A PHP class that simplifies working with images

171126.9k3](/packages/jbzoo-image)[stefangabos/zebra_image

A single-file, lightweight PHP library designed for efficient image manipulation featuring methods for modifying images and applying filters

141110.4k6](/packages/stefangabos-zebra-image)[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)
