image-rs / imageproc

Image processing operations
MIT License
758 stars 150 forks source link

Reduce code duplication in horizontal and vertical filter functions #624

Closed sunsided closed 6 months ago

sunsided commented 6 months ago

Following up on #608, I took the liberty of reducing some code duplication in the horizontal_filter and vertical_filter functions.

Do note that this branches off #608 itself and therefore looks bigger than it actually is. The actual change is the introduction of the clamp_and_reset function. This comparison gives a better idea.

theotherphil commented 6 months ago

This looks good to merge after it’s been rebased.

sunsided commented 6 months ago

@theotherphil Done. 🫡

theotherphil commented 6 months ago

Thanks!