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

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

kennynguyeenx/image-service
===========================

Provide some functions to convert images.

1.0(7y ago)02MITPHPPHP &gt;=7.0

Since Jan 1Pushed 7y agoCompare

[ Source](https://github.com/kennynguyeenx/image-service)[ Packagist](https://packagist.org/packages/kennynguyeenx/image-service)[ RSS](/packages/kennynguyeenx-image-service/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (2)Used By (0)

kennynguyeenx/image-service
===========================

[](#kennynguyeenximage-service)

> Provide some functions to manipulate images

Features
--------

[](#features)

- Resize image
- Set background color for image
- Create bigger image with old image in the center
- Convert image to the other type
- Dependencies: imagemagick, webp
- PSR-4 compatible.
- Compatible with PHP &gt;= PHP 7.

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

[](#installation)

- You can download image-service through .
- image-service requires the Multibyte String extension and the Imagick extension from PHP.
- Typically you can use the configure option `--enable-mbstring` while compiling PHP to have the Multibyte String extension. More information can be found in the [PHP documentation](http://php.net/manual/en/intro.mbstring.php).
- Imagick is a native php extension to create and modify images using the ImageMagick API. More information can be found in the [PHP documentation](http://php.net/manual/en/intro.imagick.php).

Usage
-----

[](#usage)

- Resize image:

```
use Kennynguyeenx\ImageService\ImageService;

try {
    $imageService = new ImageService();
    $imageService->manipulateImage($imageUrl, $options, $outputImagePath, $outputFormat);
} catch (Exception $exception) {
    exit($exception->getMessage());
}
```

- $options should consist these keys: width (width of new image), height (height of new image), background (background color of new image if using canvas)
- I created a file to run in console to manipulate images as an example of using this class
- It's located at bin directory with name manipulate\_image.php
- You can follow these steps to resize and convert image to the other type:

1. Save a image under the folder that you want. For me, i save it under images/source folder as example\_image.png

[![Background Image URL](README-assets/example_image.png)](README-assets/example_image.png)

2. This image have size is 300x300. We will try to resize it to 200x200 and convert it from png to gif. We can run this command:

```
$ php ./bin/manipulate_image.php ./images/source/example_image.png 200x200_ ./images/destination/updated_image.png gif

```

3. This is the result:

[![An example stickerset](README-assets/updated_image.png.gif)](README-assets/updated_image.png.gif)

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

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

Unknown

Total

1

Last Release

2688d ago

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

imageservice

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[league/glide

Wonderfully easy on-demand image manipulation library with an HTTP based API.

2.6k51.2M116](/packages/league-glide)[intervention/image-laravel

Laravel Integration of Intervention Image

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

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[lasserafn/php-initial-avatar-generator

A package to generate avatars with initials for PHP

4374.2M13](/packages/lasserafn-php-initial-avatar-generator)[ctessier/nova-advanced-image-field

An advanced image field for Nova with cropping and resizing.

103548.4k1](/packages/ctessier-nova-advanced-image-field)[laravel-at/laravel-image-sanitize

A small but handy package to prevent malicious code execution coming into your application through uploaded image files.

26056.7k](/packages/laravel-at-laravel-image-sanitize)

PHPackages © 2026

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