fernandreu / office-ribbonx-editor

An overhauled fork of the original Custom UI Editor for Microsoft Office, built with WPF
MIT License
528 stars 104 forks source link

Transparent PNGs saved incorrectly #223

Open jkorchok opened 1 year ago

jkorchok commented 1 year ago

Describe the bug PNG icons with transparent areas are often (but not always) saved incorrectly. The transparent areas become black.

To Reproduce Steps to reproduce the behavior: In Adobe PhotoShop, edit a PNG icon and use the Save for Web feature. Set a single color as the transparent color and save with a new name. Import that PNG to an Office file using the RibbonX Editor. The icon appears normally. Click on the Save button. Close the file and re-open in the RibbonX Editor or in an Office program. The transparent areas are now black. This happens with about 80% of the icons and is not predictable as to which icons will have the transparent areas recolored.

Expected behavior Icons should be saved as imported.

Screenshots See icons circled in red: https://www.brandwares.com/images/PNGSaveBug.png

Additional context Version 1.9.0.1056, under Windows 10.0.19044

Eric51284 commented 6 days ago

FWIW, I discovered that the problematic icons could be fixed by opening them in Photoshop, and changing the Image Mode from "Indexed Color" to "RGB Color".

jkorchok commented 6 days ago

Yes, but then you lose the ability to set a transparent color, which is the reason for saving to indexed color in the first place.

Eric51284 commented 6 days ago

My backgrounds have remained transparent