When decoding an image from a file, the image crate gives you an instance of DynamicImage which can be in one of many color spaces.
Applying image processing operations from the imageproc crate to it is possible, but requires a large amount of boilerplate with non-trivial generic bounds, see e.g. Shnatsel/wondermagick#16
image crate exposes the image processing operations such as rotate90 or huerotate on both generic but statically known formats and on DynamicImage. The generic functions are adapted to DynamicImage using this private macro: https://github.com/image-rs/image/blob/26df79ce4f9ed81f6477d7d3a2615e43e22ddfa8/src/images/dynimage.rs#L80-L111
Would you be open to adding such DynamicImage adapters to imageproc so that each user of this crate wouldn't have to reimplement them separately?
When decoding an image from a file, the
imagecrate gives you an instance ofDynamicImagewhich can be in one of many color spaces.Applying image processing operations from the
imageproccrate to it is possible, but requires a large amount of boilerplate with non-trivial generic bounds, see e.g. Shnatsel/wondermagick#16imagecrate exposes the image processing operations such as rotate90 or huerotate on both generic but statically known formats and onDynamicImage. The generic functions are adapted toDynamicImageusing this private macro: https://github.com/image-rs/image/blob/26df79ce4f9ed81f6477d7d3a2615e43e22ddfa8/src/images/dynimage.rs#L80-L111Would you be open to adding such
DynamicImageadapters toimageprocso that each user of this crate wouldn't have to reimplement them separately?