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

Make Kernel::new constant #648

Merged
merged 1 commit into from
May 26, 2024
Merged

Conversation

cospectrum
Copy link
Contributor

Users may also need a static Kernel!

@theotherphil
Copy link
Contributor

It’s a shame to lose the useful panic message but not the end of the world - I can’t imagine it’s likely that anyone will ever be constructing a Kernel in ways that make it hard to work out the dimensions required.

@theotherphil theotherphil merged commit b8e8482 into image-rs:master May 26, 2024
15 checks passed
height: 3,
};
pub const FOUR_LAPLACIAN_3X3: Kernel<'static, i16> =
Kernel::new(&[1, 1, 1, 1, -4, 1, 1, 1, 1], 3, 3);
Copy link
Member

Choose a reason for hiding this comment

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

I think I typed this one wrong as well, it's supposed to have zeros in the corners, whoops.

@cospectrum cospectrum deleted the new-kernel branch May 26, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants