image-rs / imageproc

Image processing operations
MIT License
736 stars 144 forks source link

Reduce code duplication in horizontal and vertical filter functions #624

Closed sunsided closed 3 months ago

sunsided commented 3 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 3 months ago

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

sunsided commented 3 months ago

@theotherphil Done. 🫡

theotherphil commented 3 months ago

Thanks!