{"id":16483470,"url":"https://github.com/dbohdan/s2png","last_synced_at":"2025-04-10T04:58:50.036Z","repository":{"id":7483080,"uuid":"8831637","full_name":"dbohdan/s2png","owner":"dbohdan","description":"Store any data in PNG images","archived":false,"fork":false,"pushed_at":"2024-05-22T11:21:34.000Z","size":121,"stargazers_count":97,"open_issues_count":0,"forks_count":7,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-22T11:56:50.825Z","etag":null,"topics":["converter","png","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/s2png","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dbohdan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-03-17T08:01:44.000Z","updated_at":"2024-05-22T11:21:37.000Z","dependencies_parsed_at":"2024-10-11T13:14:13.421Z","dependency_job_id":"e8274428-296c-40a8-ab35-4ff08b38ee35","html_url":"https://github.com/dbohdan/s2png","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Fs2png","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Fs2png/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Fs2png/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dbohdan%2Fs2png/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dbohdan","download_url":"https://codeload.github.com/dbohdan/s2png/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248161265,"owners_count":21057554,"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":["converter","png","rust"],"created_at":"2024-10-11T13:14:09.031Z","updated_at":"2025-04-10T04:58:50.014Z","avatar_url":"https://github.com/dbohdan.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# s2png — “stuff to PNG”\n\nThis program converts arbitrary binary data to and from PNG images that look like noise.\nIt was originally developed by k0wax\n[on SourceForge](http://sourceforge.net/projects/s2png/).\nI started this fork to fix a problem that caused s2png 0.01 to segfault\nwhen compiled on a 2010s operating system.\nThe fork has since accumulated various bug fixes and improvements.\nMost recently, I have ported it from C to Rust.\nAmong other things, this makes it easier to distribute s2png as a static binary.\nThe fork remains data-compatible with the original\nif you don't use the toy encryption feature.\n\n\n## Installation\n\nPrebuilt binaries are available for x86-64 Linux and i686 Windows.\nThey are attached to releases on the\n[\"Releases\"](https://github.com/dbohdan/s2png/releases) page.\n\n### Installing with Cargo\n\n```sh\ncargo install s2png\n```\n\n### Building on Debian and Ubuntu\n\nFollow the instructions to build a static Linux binary of s2png from the source code on recent Debian and Ubuntu.\n\n1\\. Install [Rustup](https://rustup.rs/).\n    Through Rustup, add the stable musl libc target for your CPU.\n\n```sh\nrustup target add x86_64-unknown-linux-musl\n```\n\n2\\. Install the build dependencies.\n\n```sh\nsudo apt install build-essential musl-tools\ncargo install just\n```\n\n3\\. Clone this repository.\n    Build the binary.\n\n```sh\ngit clone https://github.com/dbohdan/s2png\ncd s2png\njust test\njust release-linux\n```\n\n### Cross-compiling for Windows\n\nFollow the instructions to build a 32-bit Intel Windows binary of s2png on recent Debian and Ubuntu.\n\n1\\. Install [Rustup](https://rustup.rs/).\n    Through Rustup, add the i686 GNU ABI Windows target.\n\n```sh\nrustup target add i686-pc-windows-gnu\n```\n\n2\\. Install the build dependencies.\n\n```sh\nsudo apt install build-essential mingw-w64\ncargo install just\n```\n\n3\\. Configure Cargo for cross-compilation.\n  Add the following in `~/.cargo/config`.\n\n```toml\n[target.i686-pc-windows-gnu]\nlinker = \"/usr/bin/i686-w64-mingw32-gcc\"\n```\n\n4\\. Clone this repository.\n    Build the binary.\n\n```sh\ngit clone https://github.com/dbohdan/s2png\ncd s2png\njust release-windows\n```\n\n## Usage\n\n```none\ns2png (\"stuff to png\") version 1.0.0\nusage: s2png [-h] [-o filename] [-w width (600) | -s] [-b text]\n             [-p hex-key] [-e | -d] file\n\nStore any data in a PNG image.\nThis version can encode files of up to 16777215 bytes.\n\n  -h            display this message and quit\n  -o filename   output the encoded or decoded data to filename\n  -w width      set the width of the PNG image output (600 by default)\n  -s            make the output image roughly square\n  -b text       custom banner text (\"\" for no banner)\n  -p hex-key    encrypt/decrypt the output with a hexadecimal key\n                using RC4 (Warning: completely insecure! Do not use this if\n                you want actual secrecy.)\n\nNormally s2png detects which operation to perform by the file type. You can\noverride this behavior with the following switches:\n  -e            force encoding mode\n  -d            force decoding mode\n\nSee README.md for further details.\n```\n\n\n## Examples\n\nTo store `foo.mp3` in an image, enter the following command:\n\n```sh\ns2png foo.mp3\n```\n\nA file named `foo.mp3.png` will be created in the same directory as `foo.mp3`.\n\nAdd the `-s` switch to make the resulting image square (give or take a pixel)\nand `-b \"some text\"` to change the text of the banner at the bottom.\n\n```sh\ns2png -s -b hello foo.mp3\n```\n\nTo decode `decode_me.mp3.png` and retrieve the original file `decode_me.mp3`,\nrun the command\n\n```sh\ns2png decode_me.mp3.png\n```\n\nDecode `xyz.png` to `decoded.mp3` with\n\n```sh\ns2png -o decoded.mp3 xyz.png\n```\n\n## License\n\ns2png is distributed under the GNU GPL 2.0.\nSee the file [`LICENSE`](LICENSE).\nThe implementation of the RC4 streaming cypher in [`src/rc4/mod.rs`](src/rc4/mod.rs)\nis in the public domain.\nThe font from [libgd](https://github.com/libgd/libgd) is distributed under its BSD-like license.\nSee the file [`src/font/COPYING.libgd`](src/font/COPYING.libgd).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbohdan%2Fs2png","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdbohdan%2Fs2png","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdbohdan%2Fs2png/lists"}