PHPackages                             pyrou/morpheus - 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. pyrou/morpheus

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

pyrou/morpheus
==============

Library to encrypt and decrypt data in colors of a picture. Process also known as steganography

1.0.1(1w ago)251.1k8MITPHPPHP &gt;=5.3.0CI passing

Since Mar 19Pushed 1w ago5 watchersCompare

[ Source](https://github.com/pyrou/Morpheus)[ Packagist](https://packagist.org/packages/pyrou/morpheus)[ RSS](/packages/pyrou-morpheus/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (3)Used By (0)

Morpheus (莫菲斯)
==============

[](#morpheus-莫菲斯)

[![License](https://camo.githubusercontent.com/f2928df3a31308b3af5da1f5cd787a561eaf7a3dde7e4117bc26b1452b800935/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7079726f752f6d6f7270686575732e737667)](https://camo.githubusercontent.com/f2928df3a31308b3af5da1f5cd787a561eaf7a3dde7e4117bc26b1452b800935/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7079726f752f6d6f7270686575732e737667)
[![Code Climate](https://camo.githubusercontent.com/8a1d0f47136d03dd966b66918780144cee4a32f312d6e97d3ef0874080bc9eb5/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7079726f752f6d6f7270686575732f6261646765732f6770612e737667)](https://codeclimate.com/github/pyrou/morpheus)

Morpheus is a library to encrypt and decrypt data in colors of a picture. Process also known as steganography.

The project works regardless with imageMagick, GD library, or the well written [intervention](http://image.intervention.io/) library.

### Installing via Composer

[](#installing-via-composer)

The recommended way to install Morpheus is through [Composer](http://getcomposer.org).

```
composer require pyrou/morpheus
```

After installing, you need to require Composer's autoloader:

```
require 'vendor/autoload.php';
```

### How to use it

[](#how-to-use-it)

With GD library

```
# write data in image
$im = imagecreatefrompng("source.png");
Morpheus\Data::write("Helloworld", $im);
imagepng($im, "output.png");

# read data from image
$im = imagecreatefrompng("output.png");
assert("Helloworld" === Morpheus\Data::read($im));
```

With Image Magick

```
# write data in image
$im = new Imagick("source.png");
Morpheus\Data::write("Helloworld", $im);
$im->writeImage("output.png");

# read data from image
$im = new Imagick("output.png");
assert("Helloworld" === Morpheus\Data::read($im));
```

### How does it work ?

[](#how-does-it-work-)

Let's explain how it works with an example. Consider this beautiful octocat.

[![input](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/example.png)](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/example.png)

```
require 'vendor/autoload.php';
$im = imagecreatefrompng("source.png");
$data = base64_encode(
    "L'homme est un homme tant qu'il s'évertue ".
    "à s'élever au dessus de la nature, et cette ".
    "nature est à la fois intérieure et extérieure.");
Morpheus\Data::write($data, $im);
imagepng($im, "output.png");
```

Bellow is how humans and computers (or perspicuous humans) can see the `output.png` file.

source.pngoutput.png`--debug`\*[![input](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/example.png)](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/example.png)[![output.png](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/output@3x.png)](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/output@3x.png)[![What library sees](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/whatLibrarySees@3x.png)](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/whatLibrarySees@3x.png)In fact, the library has slightly changed the coloration of each pixels in upper-half of the file. So slightly that human eyes are NOT able to detect it.

\*For understand what Morpheus did, and what he sees now.

###  Health Score

53

—

FairBetter than 96% of packages

Maintenance98

Actively maintained with recent releases

Popularity31

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

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

Total

2

Last Release

12d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/56d6120c6589cfd36083cf33291f72ca55d8379528218102fd6e660fa585aded?d=identicon)[pyrou](/maintainers/pyrou)

---

Top Contributors

[![pyrou](https://avatars.githubusercontent.com/u/235005?v=4)](https://github.com/pyrou "pyrou (22 commits)")

---

Tags

gd-libraryimagemagickintervention-imagephpsteganographyImageMagickimagicksteganographygdlibimage encryptiondata encryption

### Embed Badge

![Health badge](/badges/pyrou-morpheus/health.svg)

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

###  Alternatives

[league/glide

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

2.8k52.6M137](/packages/league-glide)[orbitale/imagemagick-php

A system that allows creating commands to send to the exec() function to use ImageMagick's powerful features.

43406.9k1](/packages/orbitale-imagemagick-php)[admad/cakephp-glide

CakePHP plugin for using Glide image manipulation library.

34165.3k1](/packages/admad-cakephp-glide)[phpixie/image

PHPixie imageprocessing library

5356.9k6](/packages/phpixie-image)[francodacosta/phmagick

image manipulation with php and ImageMagick

3670.7k1](/packages/francodacosta-phmagick)[thapp/jitimage

Just in time image manipulation.

947.5k1](/packages/thapp-jitimage)

PHPackages © 2026

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