Skip to content

Finalize DynamicImage enum #856

Open

Description

@fintelia

Similar in spirit to #855, the DynamicImage enum needs some definitive set of variants before a 1.0 release. One option is to match all types included in the ColorType enum. Another more limited option (meaning less implementation effort...) would be to only include a couple core types and require, possibly expensive conversions. A possible set would be: Luminance8, Luminance32, Luminance32f, Rgb8, Rgba8, and Rgba32f.

Activity

  1. added this to the 1.0 milestone on Jan 18, 2019
  2. self-assigned this
    on Jan 18, 2019
  3. 197g commented on Jan 18, 2019

    @197g
    Member

    Different idea: Move away from an enum to an opaque struct and provide some into_xxx(self) -> Result<XXX, Self> (only if exact match), as_xxx(&self) -> Option<&XXX>, convert_to_xxx(self) -> image::Result<XXX> (with conversions where possible, though we need some way to specify if lossy is okay, limits etc). That way, we can add new representations in backwards compatible manner at any point. One con is that we somehow need to come up with better dispatch than currently to make this work internally and the interface may loose functionality before we get to writing the definitive set of helping wrappers.

  4. added
    kind: API
    on Sep 14, 2024
  5. removed their assignment
    on Aug 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionkind: API

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions