{"id":16817870,"url":"https://github.com/pyrou/morpheus","last_synced_at":"2025-08-24T22:42:30.430Z","repository":{"id":28996485,"uuid":"32523353","full_name":"pyrou/morpheus","owner":"pyrou","description":"Stop reading matrix, write on it ! Library to encrypt and decrypt data in colors of a picture. Process also known as steganography","archived":false,"fork":false,"pushed_at":"2021-03-08T11:15:55.000Z","size":89,"stargazers_count":25,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-18T07:32:58.265Z","etag":null,"topics":["gd-library","imagemagick","intervention-image","php","steganography"],"latest_commit_sha":null,"homepage":"https://pyrou.github.io/morpheus","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyrou.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-03-19T13:36:55.000Z","updated_at":"2023-04-26T12:48:03.000Z","dependencies_parsed_at":"2022-09-03T18:41:11.131Z","dependency_job_id":null,"html_url":"https://github.com/pyrou/morpheus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Fmorpheus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Fmorpheus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Fmorpheus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyrou%2Fmorpheus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyrou","download_url":"https://codeload.github.com/pyrou/morpheus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244902929,"owners_count":20529114,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gd-library","imagemagick","intervention-image","php","steganography"],"created_at":"2024-10-13T10:48:35.532Z","updated_at":"2025-03-22T03:31:24.668Z","avatar_url":"https://github.com/pyrou.png","language":"PHP","readme":"# Morpheus (莫菲斯)\n\n![License](https://img.shields.io/packagist/l/pyrou/morpheus.svg)  \n[![Code Climate](https://codeclimate.com/github/pyrou/morpheus/badges/gpa.svg)](https://codeclimate.com/github/pyrou/morpheus)\n\nMorpheus is a library to encrypt and decrypt data in colors of a picture. Process also known as steganography.\n\nThe project works regardless with imageMagick, GD library, or the well written [intervention](http://image.intervention.io/) library.\n\n### Installing via Composer\n\nThe recommended way to install Morpheus is through [Composer](http://getcomposer.org).\n\n```bash\ncomposer require pyrou/morpheus\n```\n\nAfter installing, you need to require Composer's autoloader:\n\n```php\nrequire 'vendor/autoload.php';\n```\n\n### How to use it\n\nWith GD library\n\n```php\n# write data in image\n$im = imagecreatefrompng(\"source.png\");\nMorpheus\\Data::write(\"Helloworld\", $im);\nimagepng($im, \"output.png\");\n\n# read data from image\n$im = imagecreatefrompng(\"output.png\");\nassert(\"Helloworld\" === Morpheus\\Data::read($im));\n```\n\nWith Image Magick\n\n```php\n# write data in image\n$im = new Imagick(\"source.png\");\nMorpheus\\Data::write(\"Helloworld\", $im);\n$im-\u003ewriteImage(\"output.png\");\n\n# read data from image\n$im = new Imagick(\"output.png\");\nassert(\"Helloworld\" === Morpheus\\Data::read($im));\n```\n\n### How does it work ?\n\nLet's explain how it works with an example. Consider this beautiful octocat.\n\n![input](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/example.png)\n\n```php\nrequire 'vendor/autoload.php';\n$im = imagecreatefrompng(\"source.png\");\n$data = base64_encode(\n    \"L'homme est un homme tant qu'il s'évertue \".\n    \"à s'élever au dessus de la nature, et cette \".\n    \"nature est à la fois intérieure et extérieure.\");\nMorpheus\\Data::write($data, $im);\nimagepng($im, \"output.png\");\n```\n\nBellow is how humans and computers \\(or perspicuous humans\\) can see the `output.png` file.\n\n| source.png | output.png | `--debug`\\* |\n| --- | --- | --- |\n| ![input](https://raw.githubusercontent.com/pyrou/Morpheus/master/docs/example.png) | ![output.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) |\n\nIn 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.\n\n\\*For understand what Morpheus did, and what he sees now.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrou%2Fmorpheus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyrou%2Fmorpheus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyrou%2Fmorpheus/lists"}