{"id":18206757,"url":"https://github.com/millionintegrals/image-data-encode","last_synced_at":"2025-04-02T15:30:42.353Z","repository":{"id":24491387,"uuid":"27896148","full_name":"MillionIntegrals/image-data-encode","owner":"MillionIntegrals","description":"Encode data in images","archived":false,"fork":false,"pushed_at":"2015-04-26T15:45:00.000Z","size":2544,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-17T04:36:37.762Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","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/MillionIntegrals.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":"2014-12-11T23:04:23.000Z","updated_at":"2025-01-11T00:42:41.000Z","dependencies_parsed_at":"2022-08-22T18:00:34.711Z","dependency_job_id":null,"html_url":"https://github.com/MillionIntegrals/image-data-encode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MillionIntegrals%2Fimage-data-encode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MillionIntegrals%2Fimage-data-encode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MillionIntegrals%2Fimage-data-encode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MillionIntegrals%2Fimage-data-encode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MillionIntegrals","download_url":"https://codeload.github.com/MillionIntegrals/image-data-encode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246841515,"owners_count":20842606,"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":[],"created_at":"2024-11-03T12:06:19.994Z","updated_at":"2025-04-02T15:30:41.405Z","avatar_url":"https://github.com/MillionIntegrals.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Image data encoding\n\n[![Build Status](https://travis-ci.org/MillionIntegrals/image-data-encode.svg?branch=master)](https://travis-ci.org/MillionIntegrals/image-data-encode)\n\nMy small hobby python project to test an algorithm idea I've had once, about how one can encode arbitrary chunk of data\nin an existing image without changing it visually too much.\n\nSadly, it only works when you save images in a lossless compression format such as PNG.\n\nProject is written in *Python 3*.\n\n### Usage\n\nProgram is invoked by calling the encoder/main.py file. Here is a brief help information:\n\n```\nmi@mihome ~/repos/img-data-encode\u003e python3 -m encoder.main -h\nusage: main.py [-h] [-i INFILE] [-o OUTFILE] [-a ALGORITHM] [-d DATAFILE]\n               [--block_size BLOCK_SIZE] [--intensity {1,2,3,4,5,6,7,8}]\n               {info,encode,decode}\n\nEncode data in your images\n\npositional arguments:\n  {info,encode,decode}  Specify which action you want to choose\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i INFILE, --infile INFILE\n                        Specify input file\n  -o OUTFILE, --outfile OUTFILE\n                        Specify output file\n  -a ALGORITHM, --algorithm ALGORITHM\n                        Choose your algorithm\n  -d DATAFILE, --datafile DATAFILE\n                        Specify data file\n\nAlgorithm parameters:\n  --block_size BLOCK_SIZE\n                        Algorithm block size\n  --intensity {1,2,3,4,5,6,7,8}\n                        Algorithm intensity\n```\n\nYou invoke action *info* to see how much bytes of data you can write to given image with supplied algorithm settings.\nGenerally, the higher the intensity and lower the block size the more data you can write to given image. But if you\nspecify intensity too high or block size too low distortions may become visible in encoded image.\n\nThis action only needs an *infile* and algorithm parameters.\n\nTo invoke action *encode* you need all *infile*, *outfile* and a *datafile* (plus the algorithm options). If given algorithm options give you enough data capacity to save all the data you wanted, everything should go smoothly.\n\nTo decode, specify action *decode*, an *infile* to be the previously encoded image, and an *outfile* as where to save\nthe data to. Algorithm options must be the same as in the encoding step. Decoded data will be saved to the outfile \npath.\n\n\n### How does it work\n\nWhen I have some time, I'll write an explaination about how the algorithm works. Feel free to contact me if you'd be\ninterested in seeing it.\n\n# Example\n\nThey say an image is worth a thousand words.\n\nHere is a relatively small image of a dragon (480 × 640) I've downloaded from Flickr:\n\n![dragon](https://raw.githubusercontent.com/MillionIntegrals/img-data-encode/master/data/dragon.jpg)\n\nAnd this is the same image with the whole Alice in Wonderland (160kb) text encoded in it. Parameters were block_size=3, intensity=4.\n\n![dragon encoded](https://raw.githubusercontent.com/MillionIntegrals/img-data-encode/master/data/dragon_encoded.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmillionintegrals%2Fimage-data-encode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmillionintegrals%2Fimage-data-encode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmillionintegrals%2Fimage-data-encode/lists"}