imageproc icon indicating copy to clipboard operation
imageproc copied to clipboard

Agree a sensible API for filtering so we can reduce the risk of frequent breaking changes to signatures

Open theotherphil opened this issue 1 year ago • 3 comments

What functions should exist, should we provide simple wrapper functions, what code structure do we want, and what docs need to exist to ensure discoverability.

Related: what’s our policy for breaking changes - what warrants a rename or signature change and what doesn’t.

theotherphil avatar May 28 '24 06:05 theotherphil

Ditto https://github.com/image-rs/imageproc/pull/660#issuecomment-2134034460 I think the gradient one liner functions are poor for readability and maintainability and should be deprecated.

ripytide avatar May 28 '24 07:05 ripytide

I'd disagree with renaming filter_clamped to filter since shorter names are not always better names for code readability as the name filter hides that it clamps pixel sums unless you read the docs and so could become a foot-gun.

ripytide avatar May 28 '24 07:05 ripytide

Not to mention that all the gradient functions all currently only support GrayImage, and not color images. Supporting any image pixel would require repeating filter_clamped()'s trait bounds on every one of the one-liner functions which is not very maintainable and not an easy API to learn for new users.

ripytide avatar May 28 '24 15:05 ripytide