Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Utilities: Give imgcmp a --threshold flag #25672

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nico
Copy link
Contributor

@nico nico commented Jan 31, 2025

No description provided.

@github-actions github-actions bot added the 👀 pr-needs-review PR needs review from a maintainer or community member label Jan 31, 2025
Copy link
Member

@LucasChollet LucasChollet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small nit, otherwise LGTM!

@@ -37,12 +37,15 @@ static ErrorOr<void> save_image(NonnullRefPtr<Gfx::Bitmap> bitmap, StringView ou
return Gfx::WebPWriter::encode(*buffered_stream, *bitmap);
}

static bool are_pixels_equal(Gfx::Color first_pixel, Gfx::Color second_pixel)
static bool are_pixels_equal(Gfx::Color first_pixel, Gfx::Color second_pixel, int threshold)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Can we prefer unsigned types for variables that can't be negative? Something like u8 or u32 would be better here IMO.

Copy link

stale bot commented Mar 9, 2025

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions!

@stale stale bot added the stale label Mar 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👀 pr-needs-review PR needs review from a maintainer or community member stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants