Morpheus
Stop reading matrix, write on it ! Library to encrypt and decrypt data in colors of a picture. Process also known as steganography
Install / Use
/learn @pyrou/MorpheusREADME
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 library.
Installing via Composer
The recommended way to install Morpheus is through Composer.
composer require pyrou/morpheus
After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php';
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 ?
Let's explain how it works with an example. Consider this beautiful octocat.

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.png | output.png | --debug* |
| --- | --- | --- |
|
|
|
|
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.
Related Skills
node-connect
348.0kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.8kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
348.0kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
348.0kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
