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

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

eden/image
==========

Eden image component.

4.0.1(10y ago)18.5k1MITPHPPHP &gt;=5.4.1

Since Sep 24Pushed 10y ago12 watchersCompare

[ Source](https://github.com/Eden-PHP/Image)[ Packagist](https://packagist.org/packages/eden/image)[ Docs](http://eden-php.com)[ RSS](/packages/eden-image/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (4)Dependencies (5)Versions (6)Used By (1)

[![logo](https://camo.githubusercontent.com/683ba05b2b51f50045c674b19a4f0ceb30702a8ab495623be7c02e07ab226f08/687474703a2f2f6564656e2e6f70656e6f766174652e636f6d2f6173736574732f696d616765732f636c6f75642d736f6369616c2e706e67)](https://camo.githubusercontent.com/683ba05b2b51f50045c674b19a4f0ceb30702a8ab495623be7c02e07ab226f08/687474703a2f2f6564656e2e6f70656e6f766174652e636f6d2f6173736574732f696d616765732f636c6f75642d736f6369616c2e706e67) Eden Image
================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#-eden-image)

[![Build Status](https://camo.githubusercontent.com/75a74808c26a01ec2aef0fdf06f3387141eab2e726366fe72c75cec298cbd523/68747470733a2f2f6170692e7472617669732d63692e6f72672f4564656e2d5048502f496d6167652e737667)](https://travis-ci.org/Eden-PHP/Image)
=====================================================================================================================================================================================================================================================

[](#)

- [Install](#install)
- [Introduction](#intro)
- [API](#api)
    - [blur](#blur)
    - [brightness](#brightness)
    - [colorize](#colorize)
    - [contrast](#contrast)
    - [crop](#crop)
    - [edgedetect](#edgedetect)
    - [emboss](#emboss)
    - [gaussianBlur](#gaussianBlur)
    - [getDimensions](#getDimensions)
    - [getResource](#getResource)
    - [greyscale](#greyscale)
    - [invert](#invert)
    - [meanRemoval](#meanRemoval)
    - [negative](#negative)
    - [resize](#resize)
    - [rotate](#rotate)
    - [scale](#scale)
    - [setTransparency](#setTransparency)
    - [smooth](#smooth)
    - [save](#save)
- [Contributing](#contributing)

====

Install
-------

[](#install)

`composer install eden/image`

====

Introduction
------------

[](#introduction)

Instantiate image in this manner.

```
$image = eden('image', '/path/to/image.jpg');

```

Once you are done modifying the image you can save the image to a file or simply echo out the image object like below.

```
header('Content-Type: image/jpg');
echo $image;

```

====

API
---

[](#api)

====

### blur

[](#blur)

Applies the selective blur filter. Blurs the image

#### Usage

[](#usage)

```
eden('image', '/path/to/image.jpg')->blur();

```

#### Parameters

[](#parameters)

Returns `Eden\Image\Index`

====

### brightness

[](#brightness)

Applies the brightness filter. Changes the brightness of the image.

#### Usage

[](#usage-1)

```
eden('image', '/path/to/image.jpg')->brightness(*number $level);

```

#### Parameters

[](#parameters-1)

- `*number $level` - The level of brightness

Returns `Eden\Image\Index`

#### Example

[](#example)

```
eden('image', '/path/to/image.jpg')->brightness($level);

```

====

### colorize

[](#colorize)

Applies the colorize filter. Like greyscale except you can specify the color.

#### Usage

[](#usage-2)

```
eden('image', '/path/to/image.jpg')->colorize(*number $red, *number $blue, *number $green, number $alpha);

```

#### Parameters

[](#parameters-2)

- `*number $red` - The 255 value of red to use
- `*number $blue` - The 255 value of blue to use
- `*number $green` - The 255 value of green to use
- `number $alpha` - The level of alpha transparency

Returns `Eden\Image\Index`

#### Example

[](#example-1)

```
eden('image', '/path/to/image.jpg')->colorize($red, $blue, $green);

```

====

### contrast

[](#contrast)

Applies the contrast filter. Changes the contrast of the image.

#### Usage

[](#usage-3)

```
eden('image', '/path/to/image.jpg')->contrast(*number $level);

```

#### Parameters

[](#parameters-3)

- `*number $level` - The level of contrast

Returns `Eden\Image\Index`

#### Example

[](#example-2)

```
eden('image', '/path/to/image.jpg')->contrast($level);

```

====

### crop

[](#crop)

Crops the image

#### Usage

[](#usage-4)

```
eden('image', '/path/to/image.jpg')->crop(int|null $width, int|null $height);

```

#### Parameters

[](#parameters-4)

- `int|null $width` - The width; If null will use the original width
- `int|null $height` - The height; If null will use the original height

Returns `Eden\Image\Index`

#### Example

[](#example-3)

```
eden('image', '/path/to/image.jpg')->crop();

```

====

### edgedetect

[](#edgedetect)

Applies the edgedetect filter. Uses edge detection to highlight the edges in the image.

#### Usage

[](#usage-5)

```
eden('image', '/path/to/image.jpg')->edgedetect();

```

#### Parameters

[](#parameters-5)

Returns `Eden\Image\Index`

====

### emboss

[](#emboss)

Applies the emboss filter. Embosses the image.

#### Usage

[](#usage-6)

```
eden('image', '/path/to/image.jpg')->emboss();

```

#### Parameters

[](#parameters-6)

Returns `Eden\Image\Index`

====

### gaussianBlur

[](#gaussianblur)

Applies the gaussian blur filter. Blurs the image using the Gaussian method.

#### Usage

[](#usage-7)

```
eden('image', '/path/to/image.jpg')->gaussianBlur();

```

#### Parameters

[](#parameters-7)

Returns `Eden\Image\Index`

====

### getDimensions

[](#getdimensions)

Returns the size of the image

#### Usage

[](#usage-8)

```
eden('image', '/path/to/image.jpg')->getDimensions();

```

#### Parameters

[](#parameters-8)

Returns `array`

====

### getResource

[](#getresource)

Returns the resource for custom editing

#### Usage

[](#usage-9)

```
eden('image', '/path/to/image.jpg')->getResource();

```

#### Parameters

[](#parameters-9)

Returns `[RESOURCE]`

====

### greyscale

[](#greyscale)

Applies the greyscale filter. Converts the image into grayscale.

#### Usage

[](#usage-10)

```
eden('image', '/path/to/image.jpg')->greyscale();

```

#### Parameters

[](#parameters-10)

Returns `Eden\Image\Index`

====

### invert

[](#invert)

Inverts the image.

#### Usage

[](#usage-11)

```
eden('image', '/path/to/image.jpg')->invert(bool $vertical);

```

#### Parameters

[](#parameters-11)

- `bool $vertical` - If true invert vertical; if false invert horizontal

Returns `Eden\Image\Index`

#### Example

[](#example-4)

```
eden('image', '/path/to/image.jpg')->invert();

```

====

### meanRemoval

[](#meanremoval)

Applies the mean removal filter. Uses mean removal to achieve a "sketchy" effect.

#### Usage

[](#usage-12)

```
eden('image', '/path/to/image.jpg')->meanRemoval();

```

#### Parameters

[](#parameters-12)

Returns `Eden\Image\Index`

====

### negative

[](#negative)

Applies the greyscale filter. Reverses all colors of the image.

#### Usage

[](#usage-13)

```
eden('image', '/path/to/image.jpg')->negative();

```

#### Parameters

[](#parameters-13)

Returns `Eden\Image\Index`

====

### resize

[](#resize)

Resizes the image. This is a version of scale but keeping it's original aspect ratio

#### Usage

[](#usage-14)

```
eden('image', '/path/to/image.jpg')->resize(int|null $width, int|null $height);

```

#### Parameters

[](#parameters-14)

- `int|null $width` - the width; if null will use the original width
- `int|null $height` - the height; if null will use the original height

Returns `Eden\Image\Index`

#### Example

[](#example-5)

```
eden('image', '/path/to/image.jpg')->resize();

```

====

### rotate

[](#rotate)

Rotates the image.

#### Usage

[](#usage-15)

```
eden('image', '/path/to/image.jpg')->rotate(*int $degree, int $background);

```

#### Parameters

[](#parameters-15)

- `*int $degree` - The degree to rotate by
- `int $background` - Background color code

Returns `Eden\Image\Index`

#### Example

[](#example-6)

```
eden('image', '/path/to/image.jpg')->rotate(123);

```

====

### scale

[](#scale)

Scales the image. If width or height is set to null a width or height will be auto determined based on the aspect ratio

#### Usage

[](#usage-16)

```
eden('image', '/path/to/image.jpg')->scale(int|null $width, int|null $height);

```

#### Parameters

[](#parameters-16)

- `int|null $width` - The width; if null will use the original width
- `int|null $height` - The height; if null will use the original height

Returns `Eden\Image\Index`

#### Example

[](#example-7)

```
eden('image', '/path/to/image.jpg')->scale();

```

====

### setTransparency

[](#settransparency)

Sets the background color to be transparent

#### Usage

[](#usage-17)

```
eden('image', '/path/to/image.jpg')->setTransparency();

```

#### Parameters

[](#parameters-17)

Returns `Eden\Image\Index`

====

### smooth

[](#smooth)

Applies the smooth filter. Makes the image smoother.

#### Usage

[](#usage-18)

```
eden('image', '/path/to/image.jpg')->smooth(*number $level);

```

#### Parameters

[](#parameters-18)

- `*number $level` - The level of smoothness

Returns `Eden\Image\Index`

#### Example

[](#example-8)

```
eden('image', '/path/to/image.jpg')->smooth($level);

```

====

### save

[](#save)

Saves the image data to a file

#### Usage

[](#usage-19)

```
eden('image', '/path/to/image.jpg')->save(*string $path, string|null $type);

```

#### Parameters

[](#parameters-19)

- `*string $path` - The path to save to
- `string|null $type` - The render type

Returns `Eden\Image\Index`

#### Example

[](#example-9)

```
eden('image', '/path/to/image.jpg')->save('foo');

```

====

\#Contributing to Eden

Contributions to *Eden* are following the Github work flow. Please read up before contributing.

\##Setting up your machine with the Eden repository and your fork

1. Fork the repository
2. Fire up your local terminal create a new branch from the `v4` branch of your fork with a branch name describing what your changes are. Possible branch name types:
    - bugfix
    - feature
    - improvement
3. Make your changes. Always make sure to sign-off (-s) on all commits made (git commit -s -m "Commit message")

\##Making pull requests

1. Please ensure to run `phpunit` before making a pull request.
2. Push your code to your remote forked version.
3. Go back to your forked version on GitHub and submit a pull request.
4. An Eden developer will review your code and merge it in when it has been classified as suitable.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 71.4% 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 ~195 days

Total

5

Last Release

3882d ago

Major Versions

1.0.3 → 4.0.12015-10-13

PHP version history (2 changes)1.0.2PHP &gt;=5.3.1

4.0.1PHP &gt;=5.4.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/120378?v=4)[Christian Blanquera](/maintainers/cblanquera)[@cblanquera](https://github.com/cblanquera)

---

Top Contributors

[![clark21](https://avatars.githubusercontent.com/u/5639521?v=4)](https://github.com/clark21 "clark21 (5 commits)")[![Sherlonv](https://avatars.githubusercontent.com/u/5492326?v=4)](https://github.com/Sherlonv "Sherlonv (2 commits)")

---

Tags

libraryeden

### Embed Badge

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

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

###  Alternatives

[eden/mail

Eden POP3, IMAP and SMTP component

179275.6k1](/packages/eden-mail)[sybio/image-workshop

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

854936.5k12](/packages/sybio-image-workshop)[imagekit/imagekit

PHP library for Imagekit

46877.3k10](/packages/imagekit-imagekit)[eden/sqlite

Eden SQLite Search, Collection, Model ORM componen

199.2k2](/packages/eden-sqlite)[mariojgt/witchcraft

A Laravel Package Witchcraft, a quick start for new laravel Packages

322.8k](/packages/mariojgt-witchcraft)

PHPackages © 2026

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