{"id":16654842,"url":"https://github.com/fharchive/cpp.imageencoder","last_synced_at":"2025-04-09T18:12:48.614Z","repository":{"id":54476824,"uuid":"158378378","full_name":"FHArchive/CPP.ImageEncoder","owner":"FHArchive","description":"This program encodes text in a bitmap image (.bmp). It works by using LSB  steganography which is the process of modifying the least significant bit  of a pixel to store part of a character. ","archived":false,"fork":false,"pushed_at":"2020-01-13T10:54:45.000Z","size":2581,"stargazers_count":11,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-02T10:51:12.559Z","etag":null,"topics":["cpp","lsb-steganography","steganography","steganography-algorithms"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/FHArchive.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-11-20T11:23:59.000Z","updated_at":"2024-06-26T07:20:59.000Z","dependencies_parsed_at":"2022-08-13T17:00:53.515Z","dependency_job_id":null,"html_url":"https://github.com/FHArchive/CPP.ImageEncoder","commit_stats":null,"previous_names":["fharchive/cpp.imageencoder","fredhappyface/cpp.imageencoder"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FHArchive%2FCPP.ImageEncoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FHArchive%2FCPP.ImageEncoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FHArchive%2FCPP.ImageEncoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FHArchive%2FCPP.ImageEncoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FHArchive","download_url":"https://codeload.github.com/FHArchive/CPP.ImageEncoder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238993444,"owners_count":19564805,"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":["cpp","lsb-steganography","steganography","steganography-algorithms"],"created_at":"2024-10-12T09:51:08.805Z","updated_at":"2025-02-15T12:31:13.382Z","avatar_url":"https://github.com/FHArchive.png","language":"C++","readme":"\u003cp float=\"left\"\u003e\n\u003ca href=\"../../\"\u003e\u003cimg src=\"https://img.shields.io/github/languages/top/FredHappyface/CPP.ImageEncoder.svg?style=flat-square\" alt=\"Github top language\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.codacy.com/manual/FredHappyface/CPP.ImageEncoder\"\u003e\u003cimg src=\"https://img.shields.io/codacy/grade/d82e81ee345a4c74b42fd9f8b4f00e64.svg?style=flat-square\" alt=\"Codacy grade\"\u003e\u003c/a\u003e\n\u003ca href=\"https://www.codacy.com/manual/FredHappyface/CPP.ImageEncoder\"\u003e\u003cimg src=\"https://img.shields.io/codacy/coverage/d82e81ee345a4c74b42fd9f8b4f00e64.svg?style=flat-square\" alt=\"Codacy coverage\"\u003e\u003c/a\u003e\n\u003ca href=\"../../\"\u003e\u003cimg src=\"https://img.shields.io/github/repo-size/FredHappyface/CPP.ImageEncoder.svg?style=flat-square\" alt=\"Repository size\"\u003e\u003c/a\u003e\n\u003ca href=\"../../issues\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/FredHappyface/CPP.ImageEncoder.svg?style=flat-square\" alt=\"Issues\"\u003e\u003c/a\u003e\n\u003ca href=\"/LICENSE.md\"\u003e\u003cimg src=\"https://img.shields.io/github/license/FredHappyface/CPP.ImageEncoder.svg?style=flat-square\" alt=\"License\"\u003e\u003c/a\u003e\n\u003ca href=\"../../commits/master\"\u003e\u003cimg src=\"https://img.shields.io/github/commit-activity/m/FredHappyface/CPP.ImageEncoder.svg?style=flat-square\" alt=\"Commit activity\"\u003e\u003c/a\u003e\n\u003ca href=\"../../commits/master\"\u003e\u003cimg src=\"https://img.shields.io/github/last-commit/FredHappyface/CPP.ImageEncoder.svg?style=flat-square\" alt=\"Last commit\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n# CPP.ImageEncoder\n\n\u003cimg src=\"readme-assets/icons/name.png\" alt=\"Project Icon\" width=\"750\"\u003e\n\nThis program encodes text in a bitmap image (.bmp). It works by using LSB\nsteganography which is the process of modifying the least significant bit\nof a pixel to store part of a character.\n\n\n## Define application constants\nThe default values for kHeaderSize, kFooterSize and kMaxSecretLen are\n1024. This can be changed with minimal impact on the program\n\n- kHeaderSize\nThe minimum value that I would recommend setting this to would be 256.\nAfter a quick look on Wikipedia, it looks like anywhere between 16 and\n196 bytes are required for the header. Setting it at 256 or higher\nseems safe.\n\n- kFooterSize\nIt doesn't look like a bitmap has a footer. This was included for .jpg\nimages. Play around with it if you would like but there is certainly no\nharm in leaving it at the default value\n\n- kMaxSecretLen\nThis was included to stop the python version crashing. Though it has the\nadded benefit of outputting a reasonable amount of text to the screen.\nUsing larger values will decrease the speed of the program, and increase\nthe amount of text outputted but shouldn't have an adverse effect\n\n- kCleanImageName\nI've done an MD5 hash of \"CLEAN\" and appended it to the filename to reduce\nthe chance of overwriting an important file\n\n## Functions\nRead image file in\n```cpp\nFILE* ReadImg(std::string image_name)\n```\nWrite image file\n```cpp\nFILE* WriteImg(std::string image_name)\n```\nGet the size of the image in bytes to prevent overwriting footer\n```cpp\nint GetSize(std::string image_name)\n```\nReplace the least significant bit with a 0\n```cpp\nint WriteCleanImg(std::string input_image_name, std::string output_image_name)\n```\nWrite a secret message to the image\n```cpp\nint WriteEncodedImg(std::string input_image_name, std::string output_image_name,\n\tstd::string secret_msg)\n```\nRead the encoded image\n```cpp\nint ReadEncodedImg(std::string input_image_name)\n```\nThe CLI\n```cpp\nint Cli()\n```\n\n## Using the CLI\n\"Clean, Encode, Clean and Encode (.bmp only), Decode or Quit?\n(C, e, a, d, q)\"\n\n- Entering 'c' will clean an image (specified by its path)\n- Entering 'e' will encode an image (specified by its path)\n- Entering 'a' will clean and encode an image (specified by its path)\n- Entering 'd' will decode an image (specified by its path)\n- Entering 'q' will quit the program\n\n\"Type the name of the input image (include the file extension\nand path if required)\"\n\n- Enter the path to an input image\n\n\"Type the name of the output image (include the file extension\nand path if required)\"\n\n- If the user selected Clean, Encode, or Clean and Encode. Enter\nthe path of an output image\n\n\"Type the secret message (max kMaxSecretLen characters)\"\n\n- If the user selected Encode, or Clean and Encode. Enter a message\nfor the program to encode in the image\n\n\n## Language information\nThis program is written in C++ using Visual Studio Community Edition 2017\non Windows 10. To install this IDE, go to https://visualstudio.microsoft.com/\n## How to run\n### Method 1\n1. Download or clone this GitHub repository\n2. (If downloaded) Extract the zip archive\n3. Open the project by going to File\u003e Open\u003e Project/Solution\n4. Run the program by pressing the green play button or with F5\n### Method 2\n1. Download or clone this GitHub repository\n2. (If downloaded) Extract the zip archive\n3. Go to bin\u003e Debug\n4. Double click the .exe file (note that windows will ask if you want to\nrun the file – only run executables that you trust)\n\n\n## Download\n### Clone\n#### Using The Command Line\n1. Press the Clone or download button in the top right\n2. Copy the URL (link)\n3. Open the command line and change directory to where you wish to\nclone to\n4. Type 'git clone' followed by URL in step 2\n```bash\n$ git clone https://github.com/FredHappyface/CPP.ImageEncoder\n```\n\nMore information can be found at\n\u003chttps://help.github.com/en/articles/cloning-a-repository\u003e\n\n#### Using GitHub Desktop\n1. Press the Clone or download button in the top right\n2. Click open in desktop\n3. Choose the path for where you want and click Clone\n\nMore information can be found at\n\u003chttps://help.github.com/en/desktop/contributing-to-projects/cloning-a-repository-from-github-to-github-desktop\u003e\n\n### Download Zip File\n\n1. Download this GitHub repository\n2. Extract the zip archive\n3. Copy/ move to the desired location\n\n\n## Licence\nMIT License\nCopyright (c) FredHappyface\n(See the [LICENSE](/LICENSE.md) for more information.)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffharchive%2Fcpp.imageencoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffharchive%2Fcpp.imageencoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffharchive%2Fcpp.imageencoder/lists"}