32-bit BMP's with alpha transparency - transparency not handled by Opus Preview/Viewer

32 bit BMP images are shown in the preview pane and Viewer, but transparency is not handled, with the transparent part just shown as white. PNG/WebP transparency is handled correctly by Opus. There may be other image formats that support alpha/transparency that are also not handled by Opus - I only checked BMP, PNG and WebP.

Can you add support for 32 bit BMP images with alpha/transparency to Preview/Viewer.

I have tested on latest 12.25.1 beta.

Most 32 bpp BMP files don't contain valid alpha data, and interpreting it as such would display them incorrectly.

Not many things use or produce BMP with alpha channels, to my knowledge, and when they do use the fourth channel it's not always for alpha transparency. (You can make Photoshop do it, but it's quite a roundabout process from what I remember.)

What's the workflow that has you encountering files like that?

The generally accepted definition for RGBA is that the Alpha channel corresponds to the transparency/opacity, so even though other apps use it for other purposes, it seems better to follow the "standard".

XnView handles it correctly, but I do get that for whatever reason, quite a few other apps don't.

I don't really have a specific workflow, but I'm developing a Viewer plugin and wanted it in RGBA BMP format (with the A indicating transparency), for manipulation purposes.

Would be nice if Opus supported A as transparency in BMP's, but it's not a big deal.

Do you mean an Opus viewer plugin? You can pass bitmap data to Opus with an alpha channel, you just need to set the flag that says it has one.

Yes, an Opus Viewer plugin. Haven't worked on it for a while, so I'm a bit rusty. I'll post again if I have any issues.

Would still be nice if Opus built-in BMP viewer supported RGBA transparency though, but not such a big issue.

You just need to set a flag in that case. The gif plugin's thumbnail function is an example of how.

Treating actual BMP files on disk (as opposed to BITMAP structures in memory) as having alpha channels would mis-render more files than it would help with, I suspect. But it would be simple to write a viewer plugin which handles BMP and tells Opus to use the alpha channel if you want that. (Plugins can override the internal image formats, which is what the animated gif plugin does as well.)