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.
neoscore.render_imagecurrently takes a file format and a flagpreserve_alpha. Many of the supported image formats do not actually support alpha, so exporting them withpreserve_alphagives corrupted images.neoscore.render_imageshould perform some check that the given export format actually supports alpha channels whenpreserve_alpha=True.And thinking more long-term, I think we should probably get rid of the
preserve_alphaoption 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.