Skip to content

Make resize dependency optional #18

Open
@RunDevelopment

Description

@RunDevelopment

I think the resize dependency should be optional. Users that don't need encoding or don't need mipmap generation will never use it, so I think they should have the option to disable it.

The question becomes how to do when resize is not available. I can think of 3 options:

  1. Runtime error: Just return an error when the user requests for mipmaps to be generated. The API will stay exactly the same.
  2. Fallback: It's very easy to implement a fast NN interpolation, so we could ignore the requested resize filter and just always use NN. Alternatively, we could return an error when a filter that requires resize is used (so option 1+2).
  3. #[cfg] everything: Make it so that all API related to mipmap generation are only available when resize is enabled. This has the huge downside that the API of the library depends on a feature.

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