Skip to content

Automatically determine alpha support for image export formats #113

@ajyoon

Description

@ajyoon

neoscore.render_image currently takes a file format and a flag preserve_alpha. Many of the supported image formats do not actually support alpha, so exporting them with preserve_alpha gives corrupted images. neoscore.render_image should perform some check that the given export format actually supports alpha channels when preserve_alpha=True.

And thinking more long-term, I think we should probably get rid of the preserve_alpha option automatically, and instead always use alpha channels on formats that support it. At a minor performance cost, this removes a potentially confusing source of friction where we have multiple arguments that need to align in certain unintuitive ways. This is a breaking change though, so for now I think just the above step and improved documentation would go a long way.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions