Skip to content

Commit 81c47ea

Browse files
committed
core(cpu): Fix dither processing returning non-modified frame buffer
1 parent c10e6e8 commit 81c47ea

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

core/src/processing.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,9 @@ pub(crate) fn process_pixels_cpu(
376376
"Failed to create image view from buffer for dithering".to_string(),
377377
)
378378
})?;
379-
palettized::floyd_steinberg(&mut image, config, lab_colors)
379+
palettized::floyd_steinberg(&mut image, config, lab_colors)?;
380+
image_data.copy_from_slice(image.as_raw());
381+
Ok(())
380382
}
381383
Dithering::Bn => {
382384
let mut image =
@@ -385,7 +387,9 @@ pub(crate) fn process_pixels_cpu(
385387
"Failed to create image view from buffer for dithering".to_string(),
386388
)
387389
})?;
388-
palettized::blue_noise(&mut image, config, lab_colors)
390+
palettized::blue_noise(&mut image, config, lab_colors)?;
391+
image_data.copy_from_slice(image.as_raw());
392+
Ok(())
389393
}
390394
}
391395
}

0 commit comments

Comments
 (0)