Skip to content

Commit 586ef4d

Browse files
convert BitMatrix into single channel image
1 parent 3d23c56 commit 586ef4d

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/common/bit_matrix.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,9 +792,9 @@ impl From<&BitMatrix> for image::DynamicImage {
792792

793793
for (x, y, pixel) in pixels.enumerate_pixels_mut() {
794794
let new_pixel = if value.get(x, y) {
795-
image::Rgb([0, 0, 0])
795+
image::Luma([0])
796796
} else {
797-
image::Rgb([u8::MAX, u8::MAX, u8::MAX])
797+
image::Luma([u8::MAX])
798798
};
799799
*pixel = new_pixel
800800
}

0 commit comments

Comments
 (0)