{"id":16856452,"url":"https://github.com/vallentin/loadbmp","last_synced_at":"2025-07-20T16:03:45.907Z","repository":{"id":43144256,"uuid":"65147804","full_name":"vallentin/LoadBMP","owner":"vallentin","description":"Small and simple single-header C library for loading and saving BMP images","archived":false,"fork":false,"pushed_at":"2022-12-16T11:03:59.000Z","size":7,"stargazers_count":23,"open_issues_count":4,"forks_count":7,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-04T17:05:15.036Z","etag":null,"topics":["bmp","image","load","loading","save","saving"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vallentin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-07T18:24:54.000Z","updated_at":"2024-12-04T16:14:35.000Z","dependencies_parsed_at":"2023-01-29T13:00:51.907Z","dependency_job_id":null,"html_url":"https://github.com/vallentin/LoadBMP","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vallentin/LoadBMP","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2FLoadBMP","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2FLoadBMP/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2FLoadBMP/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2FLoadBMP/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vallentin","download_url":"https://codeload.github.com/vallentin/LoadBMP/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vallentin%2FLoadBMP/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266152253,"owners_count":23884473,"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":["bmp","image","load","loading","save","saving"],"created_at":"2024-10-13T14:04:17.009Z","updated_at":"2025-07-20T16:03:45.889Z","avatar_url":"https://github.com/vallentin.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# LoadBMP [![Build Status][LoadBMPBuildStatus]][LoadBMPCI] ![Release][LoadBMPVersionBadge] ![License][LoadBMPLicenseBadge]\n\n[LoadBMP][LoadBMP] is a single-header C library\nfor loading and saving [BMP][BMP] image files.\n\n[LoadBMP][LoadBMP] has no no dependencies besides the standard C libraries\n`stdlib.h`, `string.h` and `stdio.h`.\n\n\n## Examples\n\n[LoadBMP][LoadBMP] uses raw buffers and support RGB (`LOADBMP_RGB`) and RGBA (`LOADBMP_RGBA`) formats.\nThe order is RGBRGBRGB... or RGBARGBARGBA..., from top left\nto bottom right, without any padding.\n\nThe format ultimately only affects the size and layout of the pixel buffer.\nThereby when loading a BMP and selecting `LOADBMP_RGBA`, an alpha value of 255 is added.\nWhen saving the BMP the knowledge of an alpha value is only used to be able\nto skip it and properly index the colors.\n\n### Loading BMP\n\n```c\nunsigned char *pixels = NULL;\nunsigned int width, height;\n\nunsigned int err = loadbmp_decode_file(\"image.bmp\", \u0026pixels, \u0026width, \u0026height, LOADBMP_RGBA);\n\nif (err)\n\tprintf(\"LoadBMP Load Error: %u\\n\", err);\n\n// Remember to free the pixel data when it isn't needed anymore.\nfree(pixels);\n```\n\n\n### Saving BMP\n\n```c\nunsigned char *pixels = ...;\nunsigned int width, height;\n\nunsigned int err = loadbmp_encode_file(\"image.bmp\", pixels, width, height, LOADBMP_RGBA);\n\nif (err)\n\tprintf(\"LoadBMP Load Error: %u\\n\", err);\n```\n\n\n## Reporting Bugs \u0026 Requests\n\nFeel free to use the [issue tracker][LoadBMPIssues],\nfor reporting bugs, submitting patches or requesting features.\n\nBefore submitting bugs, make sure that you're using the latest version of [LoadBMP][LoadBMP].\n\n\n## License\n\n```\nCopyright (c) 2016 Christian Vallentin \u003cvallentin.source@gmail.com\u003e\n\nThis software is provided 'as-is', without any express or implied\nwarranty. In no event will the authors be held liable for any damages\narising from the use of this software.\n\nPermission is granted to anyone to use this software for any purpose,\nincluding commercial applications, and to alter it and redistribute it\nfreely, subject to the following restrictions:\n\n1. The origin of this software must not be misrepresented; you must not\n   claim that you wrote the original software. If you use this software\n   in a product, an acknowledgment in the product documentation would be\n   appreciated but is not required.\n\n2. Altered source versions must be plainly marked as such, and must not\n   be misrepresented as being the original software.\n\n3. This notice may not be removed or altered from any source\n   distribution.\n```\n\n\n[LoadBMP]: https://github.com/vallentin/LoadBMP\n[LoadBMPLicense]: https://github.com/vallentin/LoadBMP/blob/master/LICENSE\n\n[LoadBMPBuildStatus]: https://drone.io/github.com/vallentin/LoadBMP/status.png\n[LoadBMPCI]: https://drone.io/github.com/vallentin/LoadBMP/latest\n\n[LoadBMPVersionBadge]: https://img.shields.io/badge/release-v1.0.0-blue.svg\n[LoadBMPLicenseBadge]: https://img.shields.io/badge/license-%20free%20to%20use%2C%20share%2C%20modify%20and%20redistribute-blue.svg\n\n[LoadBMPIssues]: https://github.com/vallentin/LoadBMP/issues\n\n[BMP]: https://en.wikipedia.org/wiki/BMP_file_format\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvallentin%2Floadbmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvallentin%2Floadbmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvallentin%2Floadbmp/lists"}