I would like to be able to use into_frames whilst choosing the image format I'm converting to.
My specific use case for this functionality is converting animations to grayscale, and therefore converting to rgba8 where the image wasn't already encoded like that is wasteful.
This is more generally applicable to any time you want to specify the format you're changing the image into whilst processing.
Draft
One of the following approaches would make sense to me:
- Adding a type parameter to
Frame for the image format, and into support from DynamicImage to the various formats.
- Changing
Frame to be over DynamicImage instead of RgbaImage
- Alternatively, enabling users to re-implement
into_frames using only public methods (decode_to_dynimage and reader.inner are private)
I would like to be able to use
into_frameswhilst choosing the image format I'm converting to.My specific use case for this functionality is converting animations to grayscale, and therefore converting to rgba8 where the image wasn't already encoded like that is wasteful.
This is more generally applicable to any time you want to specify the format you're changing the image into whilst processing.
Draft
One of the following approaches would make sense to me:
Framefor the image format, andintosupport from DynamicImage to the various formats.Frameto be overDynamicImageinstead ofRgbaImageinto_framesusing only public methods (decode_to_dynimageandreader.innerare private)