{"id":23738084,"url":"https://github.com/csmart/bmpedit","last_synced_at":"2026-03-01T17:30:17.168Z","repository":{"id":7745783,"uuid":"9112979","full_name":"csmart/bmpedit","owner":"csmart","description":null,"archived":false,"fork":false,"pushed_at":"2015-06-18T05:07:44.000Z","size":1476,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-31T08:52:33.639Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/csmart.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-30T07:41:44.000Z","updated_at":"2015-06-18T05:02:54.000Z","dependencies_parsed_at":"2022-07-09T20:00:33.222Z","dependency_job_id":null,"html_url":"https://github.com/csmart/bmpedit","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/csmart%2Fbmpedit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csmart%2Fbmpedit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csmart%2Fbmpedit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/csmart%2Fbmpedit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/csmart","download_url":"https://codeload.github.com/csmart/bmpedit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239879312,"owners_count":19712176,"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-12-31T08:52:41.486Z","updated_at":"2026-03-01T17:30:17.126Z","avatar_url":"https://github.com/csmart.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"About\n-----\nbmpedit is licensed under GPLv3 or later, see COPYING file for details.\n\nThis small program prints out information about a BMP image and then\nmanipulates the image in a few simple ways.\n\nIn its simplest form, simply run the program and pass in a single option\nbeing the path of a BMP image. The program will then print out relevant\ninformation about the file such as:\n * Image width\n * Image height\n * Image bit depth\n * Compression type\n * Various header details\n\nYou can also perform one of two functions on the file, currently either:\n * black and white threshold filter\n * brightness filter\n\nTo perform one of those (conflicting) functions, pass the respective\noption (-t or -b) and a corresponding value betwen 0.0 and 1.0.\n\nThe program will create an output BMP image called \"output.bmp\" in the\ncurrent directory, or you can override this with the -o option.\n\nSee the help for more details (-h option).\n\nHow to compile\n--------------\nTo compile and run this program you need gcc installed:\n\nOn Fedora, run:\n  # sudo yum install gcc\n\nOn Debian, run:\n  # sudo apt-get install gcc\n\nThen from inside the source directory, run:\n  # gcc bmpedit.c -o bmpedit\n\nHow to run\n----------\nTo view the help, simply run:\n  # ./bmpedit -h\n\nTo test the program, simply run with path of bmp image:\n  # ./bmpedit samples/cup.bmp\n\nTo test the black \u0026 white filter, simply pass the option with a value, e.g:\n  # ./bmpedit -t 0.75 samples/cup.bmp\n\nSimilarly test the brightness filter, simply pass the option with a value, e.g:\n  # ./bmpedit -b 0.25 samples/cup.bmp\n\nThese commands will create a file called \"output.bmp\" in the current directory,\nyou can override this with the -o flag and pass a path/filename.\n\nLimitations\n-----------\nThis program should print information on most BMP images, however the filters\nare only supported on BMP images that meet the following criteria:\n * 24bit\n * Uncompressed\n * BM header format\n * BITMAPINFOHEADER DIB header format\n\nObvious improvements to this program would be in all of these areas.\n\nIn terms of the code, it performs a manual bitshift to handle little endian\nformat but should probably use endian.h library to handle this no-matter the\nplatform.\n\nTesting\n-------\nThis code will certainly have bugs. I have only tested this on a 64 bit Intel \nLinux system with the GCC compiler.\n\nI have however, tested it with a range of BMP (and other format) files to \nensure that the program exits nicely when it comes up against an unsupported \nformat (such as compressed, non-bmp, non-24bit, etc).\n\nI also tested BMPs which had colour information written to the header (this\nmoves the pixel array offset).\n\nI have tested the sanity of options, including the input names, thresholds \nand added code to error on invalid values such as negative integers.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsmart%2Fbmpedit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcsmart%2Fbmpedit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcsmart%2Fbmpedit/lists"}