Skip to content

Commit

Permalink
cargo rdme
Browse files Browse the repository at this point in the history
  • Loading branch information
orph3usLyre committed Oct 4, 2024
1 parent 92649a3 commit 4ce5fac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ consider a color quantization technique such as median cut, k-means clustering,

```rust
use image::GenericImageView;
use libbsb::{BitMap, KapImageFile, image::raw::header::{ImageHeader, GeneralParameters}, Depth};
use libbsb::{KapImageFile, image::raw::header::{ImageHeader, GeneralParameters}, image::BitMap, Depth};
use std::collections::HashMap;

fn main() -> anyhow::Result<()> {
Expand All @@ -102,7 +102,7 @@ fn main() -> anyhow::Result<()> {
debug_assert!(i <= 127);

// BSB indexes start from 1
bitmap.set_pixel(x as u16, y as u16, i + 1)
bitmap.set_pixel_index(x as u16, y as u16, i + 1)
}
let mut palette = map.into_iter().collect::<Vec<_>>();
palette.sort_by_key(|(_, i)| *i);
Expand Down Expand Up @@ -134,5 +134,8 @@ releases until`v1.0`. All the Raw types in this library carry the `#[non_exhaust
attribute and implement the builder pattern. To avoid breaking changes between versions, use
the `Builder` version of the types where possible and set specific fields sparingly.

### License

Dual-licensed under Apache 2.0 and MIT terms.

<!-- cargo-rdme end -->

0 comments on commit 4ce5fac

Please sign in to comment.