Classic Shell
http://www.classicshell.net/forum/

Premultiplied Alpha and not premultiplied images
http://www.classicshell.net/forum/viewtopic.php?f=17&t=7243
Page 1 of 1

Author:  juniper7 [ Thu Jan 05, 2017 1:46 pm ]
Post subject:  Premultiplied Alpha and not premultiplied images

Premultiplied Alpha and not premultiplied images.


From what I see in the skinning tutorial, CSM does not use premultiplied images:
"For 32-bit images don't premultiply the alpha channel. If you don't know what "premultiply the alpha" means, never mind."


A lot of buttons, user picture frames, menu images from msstyles files have some type of premultiplied alpha in them.
It's some kind of merging, and throwing away pixels process. They appear darker in a photo program.

Example red color:

* Red pixels with a premultiplied alpha of 50% have 8bit RGBA value: 127,0,0,127

* Red pixels with a ………straight alpha of 50% have 8bit RGBA value: 255,0,0,127

What's puzzling to me is photo programs do this anyway, and a premultiplied, or not premultipled same image look same in editor.
I think MS multiplied with a different factor, to make it hard on us. :x

How to exactly undo premultiplied alpha image, so it can be used?
Beats the H%LL out of me, and everyone else.
Can only boost the brightness of all channels to get approximate look from original os.

Attachments:
Not premultiplied. examples.zip [1.15 KiB]
Downloaded 113 times

Author:  Blokk888 [ Tue Jan 02, 2018 11:53 am ]
Post subject:  Re: Premultiplied Alpha and not premultiplied images

thank

Author:  juniper7 [ Tue Jan 02, 2018 3:56 pm ]
Post subject:  Re: Premultiplied Alpha and not premultiplied images

I found a free program later, that can switch between premultiplied and not premultiplied.
It is called Blender.

I never got around to trying the buttons I converted on an actual menu.
I had just used screenshots.

Here is example of the shutdown button that got set correctly for CSM:

; Shutdown button

Shutdown_selection=19
Shutdown_jump_selection=19
Shutdown_search_selection=19
Shutdown_selection_slices_X=5,14,4,3,14,5
Shutdown_selection_slices_Y=5,14,5

You can be the first to try it.

Attachments:
fixed premultiplied shutdown.png
fixed premultiplied shutdown.png [ 1.52 KiB | Viewed 134 times ]

Page 1 of 1 All times are UTC - 8 hours [ DST ]
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/