Skip to content

Add support for different image types for into_frames #2996

Description

@muddyfish

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions