{"id":30592980,"url":"https://github.com/embedded-graphics/tinybmp","last_synced_at":"2026-01-16T12:33:15.199Z","repository":{"id":41949801,"uuid":"309634837","full_name":"embedded-graphics/tinybmp","owner":"embedded-graphics","description":"A no_std BMP library for embedded applications. ","archived":false,"fork":false,"pushed_at":"2026-01-14T18:42:47.000Z","size":182,"stargazers_count":29,"open_issues_count":4,"forks_count":11,"subscribers_count":2,"default_branch":"main","last_synced_at":"2026-01-14T22:56:29.138Z","etag":null,"topics":["bmp","embedded-graphics","hacktoberfest","no-std"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/tinybmp","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/embedded-graphics.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"jamwaffles","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-11-03T09:25:20.000Z","updated_at":"2026-01-14T18:42:52.000Z","dependencies_parsed_at":"2024-06-11T02:55:09.865Z","dependency_job_id":"8444b6a8-d548-498f-9ffb-be525ed36e67","html_url":"https://github.com/embedded-graphics/tinybmp","commit_stats":{"total_commits":39,"total_committers":3,"mean_commits":13.0,"dds":0.4871794871794872,"last_synced_commit":"8b4c2ced92a9ff16b5c534ca11c9877ff5d31a8d"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/embedded-graphics/tinybmp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Ftinybmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Ftinybmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Ftinybmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Ftinybmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/embedded-graphics","download_url":"https://codeload.github.com/embedded-graphics/tinybmp/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/embedded-graphics%2Ftinybmp/sbom","scorecard":{"id":374678,"data":{"date":"2025-08-11","repo":{"name":"github.com/embedded-graphics/tinybmp","commit":"2c67eecf9a090c6fc59bdb34ef45caa8d7c8d60e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.5,"checks":[{"name":"Code-Review","score":7,"reason":"Found 17/24 approved changesets -- score normalized to 7","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"1 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:11: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:54: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:58: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/embedded-graphics/tinybmp/ci.yml/main?enable=pin","Info:   0 out of   6 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   8 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE-APACHE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE-APACHE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 24 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T13:57:59.618Z","repository_id":41949801,"created_at":"2025-08-18T13:57:59.618Z","updated_at":"2025-08-18T13:57:59.618Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28478683,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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","embedded-graphics","hacktoberfest","no-std"],"created_at":"2025-08-29T18:03:31.735Z","updated_at":"2026-01-16T12:33:15.153Z","avatar_url":"https://github.com/embedded-graphics.png","language":"Rust","funding_links":["https://github.com/sponsors/jamwaffles"],"categories":[],"sub_categories":[],"readme":"# TinyBMP\n\n[![CI Status](https://github.com/embedded-graphics/tinybmp/actions/workflows/ci.yml/badge.svg)](https://github.com/embedded-graphics/tinybmp/actions/workflows/ci.yml)\n[![Crates.io](https://img.shields.io/crates/v/tinybmp.svg)](https://crates.io/crates/tinybmp)\n[![Docs.rs](https://docs.rs/tinybmp/badge.svg)](https://docs.rs/tinybmp)\n[![embedded-graphics on Matrix](https://img.shields.io/matrix/rust-embedded-graphics:matrix.org)](https://matrix.to/#/#rust-embedded-graphics:matrix.org)\n\n## [Documentation](https://docs.rs/tinybmp)\n\nA small BMP parser primarily for embedded, no-std environments but usable anywhere.\n\nThis crate is primarily targeted at drawing BMP images to [`embedded_graphics`] [`DrawTarget`]s,\nbut can also be used to parse BMP files for other applications.\n\n## Examples\n\n### Draw a BMP image to an embedded-graphics draw target\n\nThe [`Bmp`] struct is used together with [`embedded_graphics`]' [`Image`] struct to display BMP\nfiles on any draw target.\n\n```rust\nuse embedded_graphics::{image::Image, prelude::*};\nuse tinybmp::Bmp;\n\n// Include the BMP file data.\nlet bmp_data = include_bytes!(\"../tests/chessboard-8px-color-16bit.bmp\");\n\n// Parse the BMP file.\nlet bmp = Bmp::from_slice(bmp_data).unwrap();\n\n// Draw the image with the top left corner at (10, 20) by wrapping it in\n// an embedded-graphics `Image`.\nImage::new(\u0026bmp, Point::new(10, 20)).draw(\u0026mut display)?;\n```\n\n### Using the pixel iterator\n\nTo access the image data for other applications the [`Bmp::pixels`] method returns an iterator\nover all pixels in the BMP file. The colors inside the BMP file will automatically converted to\none of the [color types] in [`embedded_graphics`].\n\n```rust\nuse embedded_graphics::{pixelcolor::Rgb888, prelude::*};\nuse tinybmp::Bmp;\n\n// Include the BMP file data.\nlet bmp_data = include_bytes!(\"../tests/chessboard-8px-24bit.bmp\");\n\n// Parse the BMP file.\n// Note that it is necessary to explicitly specify the color type which the colors in the BMP\n// file will be converted into.\nlet bmp = Bmp::\u003cRgb888\u003e::from_slice(bmp_data).unwrap();\n\nfor Pixel(position, color) in bmp.pixels() {\n    println!(\"R: {}, G: {}, B: {} @ ({})\", color.r(), color.g(), color.b(), position);\n}\n```\n\n### Accessing individual pixels\n\n[`Bmp::pixel`] can be used to get the color of individual pixels. The returned color will be automatically\nconverted to one of the [color types] in [`embedded_graphics`].\n\n```rust\nuse embedded_graphics::{pixelcolor::Rgb888, image::GetPixel, prelude::*};\nuse tinybmp::Bmp;\n\n// Include the BMP file data.\nlet bmp_data = include_bytes!(\"../tests/chessboard-8px-24bit.bmp\");\n\n// Parse the BMP file.\n// Note that it is necessary to explicitly specify the color type which the colors in the BMP\n// file will be converted into.\nlet bmp = Bmp::\u003cRgb888\u003e::from_slice(bmp_data).unwrap();\n\nlet pixel = bmp.pixel(Point::new(3, 2));\n\nassert_eq!(pixel, Some(Rgb888::WHITE));\n```\n\nNote that you currently cannot access invidual pixels when working with RLE4\nor RLE8 compressed indexed bitmaps. With these formats the `pixel()`\nfunction will always return `None`.\n\n### Accessing the raw image data\n\nFor most applications the higher level access provided by [`Bmp`] is sufficient. But in case\nlower level access is necessary the [`RawBmp`] struct can be used to access BMP [header\ninformation] and the [color table]. A [`RawBmp`] object can be created directly from image data\nby using [`from_slice`] or by accessing the underlying raw object of a [`Bmp`] object with\n[`Bmp::as_raw`].\n\nSimilar to [`Bmp::pixel`], [`RawBmp::pixel`] can be used to get raw pixel color values as a\n`u32`.\n\n```rust\nuse embedded_graphics::prelude::*;\nuse tinybmp::{RawBmp, Bpp, Header, RawPixel, RowOrder, CompressionMethod};\n\nlet bmp = RawBmp::from_slice(include_bytes!(\"../tests/chessboard-8px-24bit.bmp\"))\n    .expect(\"Failed to parse BMP image\");\n\n// Read the BMP header\nassert_eq!(\n    bmp.header(),\n    \u0026Header {\n        file_size: 314,\n        image_data_start: 122,\n        bpp: Bpp::Bits24,\n        image_size: Size::new(8, 8),\n        image_data_len: 192,\n        channel_masks: None,\n        row_order: RowOrder::BottomUp,\n        compression_method: CompressionMethod::Rgb,\n    }\n);\n\n// Get an iterator over the pixel coordinates and values in this image and load into a vec\nlet pixels: Vec\u003cRawPixel\u003e = bmp.pixels().collect();\n\n// Loaded example image is 8x8px\nassert_eq!(pixels.len(), 8 * 8);\n\n// Individual raw pixel values can also be read\nlet pixel = bmp.pixel(Point::new(3, 2));\n\n// The raw value for a white pixel in the source image\nassert_eq!(pixel, Some(0xFFFFFFu32));\n```\n\n## Minimum supported Rust version\n\nThe minimum supported Rust version for tinybmp is `1.81` or greater. Ensure you have the correct\nversion of Rust installed, preferably through \u003chttps://rustup.rs\u003e.\n\n[`Bmp`]: https://docs.rs/tinybmp/latest/tinybmp/struct.Bmp.html\n[`Bmp::pixels`]: https://docs.rs/tinybmp/latest/tinybmp/struct.Bmp.html#method.pixels\n[`Bmp::pixel`]: https://docs.rs/tinybmp/latest/tinybmp/struct.Bmp.html#method.pixel\n[`Bmp::as_raw`]: https://docs.rs/tinybmp/latest/tinybmp/struct.Bmp.html#method.as_raw\n[`RawBmp`]: https://docs.rs/tinybmp/latest/tinybmp/struct.RawBmp.html\n[`RawBmp::pixel`]: https://docs.rs/tinybmp/latest/tinybmp/struct.RawBmp.html#method.pixel\n[header information]: https://docs.rs/tinybmp/latest/tinybmp/struct.RawBmp.html#method.header\n[color table]: https://docs.rs/tinybmp/latest/tinybmp/struct.RawBmp.html#method.color_table\n[`from_slice`]: https://docs.rs/tinybmp/latest/tinybmp/struct.RawBmp.html#method.from_slice\n\n[`embedded_graphics`]: https://docs.rs/embedded_graphics\n[color types]: https://docs.rs/embedded-graphics/latest/embedded_graphics/pixelcolor/index.html#structs\n[`DrawTarget`]: https://docs.rs/embedded-graphics/latest/embedded_graphics/draw_target/trait.DrawTarget.html\n[`Image`]: https://docs.rs/embedded-graphics/latest/embedded_graphics/image/struct.Image.html\n\n[color types]: embedded_graphics::pixelcolor#structs\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the\nwork by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembedded-graphics%2Ftinybmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembedded-graphics%2Ftinybmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembedded-graphics%2Ftinybmp/lists"}