Skip to content

Commit

Permalink
fix typo
Browse files Browse the repository at this point in the history
Signed-off-by: Jess Frazelle <github@jessfraz.com>
  • Loading branch information
jessfraz committed Jul 5, 2023
1 parent 0291ff2 commit 79b6ad0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "twenty-twenty"
description = "Visual regression testing of H264 frames and images."
version = "0.3.0"
version = "0.4.0"
edition = "2021"
license = "MIT"

Expand Down
4 changes: 1 addition & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ pub fn assert_image<P: AsRef<std::path::Path>>(path: P, actual: &image::DynamicI
/// the test will fail.
/// The score is a float between 0 and 1.
/// If the images are the exact same, the score will be 1.
/// This compartes the H.264 frame to a PNG. This is because then the diff will be easily visible
/// This compares the H.264 frame to a PNG. This is because then the diff will be easily visible
/// in a UI like GitHub's.
#[track_caller]
pub fn assert_h264_frame<P: AsRef<std::path::Path>>(path: P, actual: &[u8], threshold: f64) {
Expand Down Expand Up @@ -127,8 +127,6 @@ pub(crate) fn h264_frame_to_image(data: &[u8]) -> Result<image::DynamicImage> {
// Convert the decoded frame to an RGB format
video_frame.set_format(ffmpeg::format::Pixel::RGB24);

// Save the image to disk.

// Create an image from the RGB frame
let Some(raw) = image::RgbImage::from_raw(video_frame.width(), video_frame.height(), video_frame.data(0).to_vec()) else {
anyhow::bail!("could not parse image from raw");
Expand Down

0 comments on commit 79b6ad0

Please sign in to comment.