tinybmp is a no_std, low memory footprint BMP loading library for embedded applications.
Unreleased - ReleaseDate
- #55 Added methods
CompressionMethod::is_compressedandHeader::bytes_per_row. The latter is essential information when walking through the bytes yourself.
0.7.0 - 2026-01-14
- #50 Fixed handling of padding bytes in absolute mode for RLE4 compressed files.
- #51 Added
RawBmp::colorsmethod to iterator of the raw color values in a file. - #51 Added
DynamicRawColors,RawColors,Rle4Colors, andRle8Colorsiterators.
- (breaking) #49 Use 1.81 as the MSRV.
- #46
Bmp::from_sliceis nowconst, so BMPs can be put inconsts andstatics. - #47 Ignore compressed data length on RGB compression method.
0.6.0 - 2024-06-11
- #41 Added support for RLE8 and RLE4 encoded bitmaps.
- (breaking) #41 Use 1.71 as the MSRV.
0.5.0 - 2023-05-17
- (breaking) #39 Updated
embedded-graphicsdependency to0.8. - (breaking) #39 Replaced
Bmp::pixelmethod withembedded_graphics::image::GetPixelimpl.
0.4.0 - 2022-09-30
- #28 Added a
ColorTablestruct and theRawBmp::color_tablegetter to access the BMP files color table. - #28 Added support for 4bpp images with color table.
- #28 Added
displayexample to display BMP images using the embedded-graphics simulator. - #34 Added
Bmp::pixelandRawBmp::pixelto access individual pixels.
- (breaking) #31 Use 1.61 as the MSRV.
- (breaking) #28 Merged
DynamicBmpandBmp.Bmpwill now automatically convert colors and doesn't require explicit color type annotations anymore. - (breaking) #28 Changed bounds for the
Bmpcolor type fromC: PixelColor + From<<C as PixelColor>::Raw>toC: PixelColor + From<Rgb555> + From<Rgb565> + From<Rgb888>. - (breaking) #28 Added additional
ParseErrorvariants for improved reporting of errors. - (breaking) #28 Removed
RawBmp::sizeandRawBmp::color_bpp. UseRawBmp::header().image_sizeandRawBmp::header().bppinstead. - #28
Bpp::bits,RawBmp::image_data,RawBmp::header, andRawPixel::neware nowconst. - #28 BMP files with incomplete image data are now detected by
Bmp::from_slice.
- #32 Report error for images with
width <= 0orheight == 0instead of causing a panic.
0.3.3 - 2022-04-18
- #25 Fixed a bug in the new color table support added in v0.3.2 where the color table length was incorrectly calculated.
0.3.2 - 2022-04-16
- #19 Added support for color mapped 1bpp and 8bpp images. This change now also requires 1bpp and 8bpp images to contain a color table.
0.3.1 - 2021-06-16
- #13 Bump embedded-graphics minimum version from 0.7.0 to 0.7.1
0.3.0 - 2021-06-06
0.3.0-beta.2 - 2021-05-24
- (breaking) #9 Added support for BMP images saved in top-down row order. A computed field
row_orderis added to theHeaderstruct to capture whether the image data is ordered top-down, or the standard bottom-up.
0.3.0-beta.1 - 2021-05-24
0.3.0-alpha.1 - 2020-12-27
- (breaking) #3
tinybmpnow depends onembedded-graphics-coreinstead ofembedded-graphics.
0.3.0-alpha.1 - embedded-graphics repository - 2020-12-27
Note: PR numbers from this point onwards are from the old
embedded-graphics/embedded-graphicsrepository. New PR numbers above this note refer to PRs in theembedded-graphics/tinybmprepository.
- #453
DynamicBmpwas added to load images with an unknown color format at compile time.
- (breaking) #420 To support the new embedded-graphics 0.7 image API a color type parameter was added to
Bmp. - (breaking) #444 The
graphicsfeature was removed and theembedded-graphicsdependency is now non optional. - (breaking) #444
Bmpno longer implementsIntoIterator. Pixel iterators can now be created using thepixelsmethods. - (breaking) #444
Bmp::widthandBmp::heightwere replaced byBmp::sizewhich requiresembedded_graphics::geometry::OriginDimensionsto be in scope (also included in the embedded-graphicsprelude). - (breaking) #444
Bmp::from_slicenow checks if the image BPP matches the specified color type. To report possible errors it now returns the dedicated error typeParseErrorinstead of(). - (breaking) #444
Bmp::bppwas renamed toBmp::color_bppto be consistent withtinytgaand the return type was changed to an enum. - (breaking) #453 The methods to access the raw image data and header were moved to a new
RawBmptype, which can be used on its own or can be accessed by usingBmp::as_raworDynamicBmp::as_raw.
0.2.3 - 2020-05-26
- #352 Added support for decoding 1 bit pixel depth BMP images.
0.2.2 - 2020-03-20
0.2.1 - 2020-02-17
- #244 Added
.into_iter()support to theBmpstruct to get an iterator over every pixel in the image.
-
(breaking) #247 "reverse" integration of tinybmp into
embedded-graphics. tinybmp now has agraphicsfeature that must be turned on to enable embedded-graphics support. Thebmpfeature from embedded-graphics is removed.Before
Cargo.toml[dependencies] embedded-graphics = { version = "0.6.0-alpha.3", features = [ "bmp" ]}
Your code
use embedded_graphics::prelude::*; use embedded_graphics::image::ImageBmp; let image = ImageBmp::new(include_bytes!("../../../assets/patch.bmp")).unwrap(); display.draw(&image);
After
Cargo.toml[dependencies] embedded-graphics = "0.6.0" tinybmp = { version = "*", features = [ "graphics" ]}
Your code
use embedded_graphics::{prelude::*, image::Image}; use tinybmp::Bmp; let image = Bmp::new(include_bytes!("../../../assets/patch.bmp")).unwrap(); let image = Image::new(&image); display.draw(&image);
- #218 Test README examples in CI and update them to work with latest crate versions.
- #228 Upgraded to nom 5 internally. No user-facing changes.
- Release
tinybmpcrate to crates.io