image icon indicating copy to clipboard operation
image copied to clipboard

Add features that will use C implementations.

Open installgentoo opened this issue 3 years ago • 1 comments

I would like to be able to load images.

My specific use case for this functionality is ...

Loading newer formats in general.

Draft

image was and continues to be an awful implementation for many modern formats, webp was greyscale for the longest time, and it's still incapable of being utilized with alpha. Now, i understand that you guys did good job on old formats and you can't just code up everything instantly, however image right now is just not good enough for anything beyond jpeg-png axis.

Therefore, i suggest adding features that enable decoders using ffi libraries. There are already a few *-image adapter crates, but these are maintained coincidentally really.

Case in point, Avif already depends on dav1d-sys. You're not gonna code your own avif decoder any time soon. So formalize the native rust implementations vs ffi implementations, add features such as webp vs webp-ffi, throw out -ffi features when image support becomes better than the ffi support.

installgentoo avatar Jan 12 '22 04:01 installgentoo

Another case in point - jxl. There is a crate that supports it and integrates perfectly with image. Except image doesn't have a format for it, and someone who doesn't understand magic bytes or didn't look into image internals will never have good support for jxl with image.

installgentoo avatar Jan 12 '22 10:01 installgentoo

We've now have a policy of exposing some native dependencies via non-default features so I'm going to go ahead and close this

fintelia avatar Oct 25 '22 02:10 fintelia