From 4ce5fac86b06e4d7c4018bfaeaf79bbe3be5d2a9 Mon Sep 17 00:00:00 2001 From: orph3uslyre Date: Fri, 4 Oct 2024 09:59:12 +0200 Subject: [PATCH] cargo rdme --- README.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index fd664fb..d05980e 100644 --- a/README.md +++ b/README.md @@ -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<()> { @@ -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::>(); palette.sort_by_key(|(_, i)| *i); @@ -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.