2016r3
I an working on an app that needs to run on both Mac (retina and not) and Windows and it uses a toolbar with toll buttons with Icons. I an using PNG Icons with alpha channels. It looks great on the Mac the but on Windows the transparent parts show up as black even with UseGDIPlus on… Obviously not good…
How do I deal with this?
In the past I would have used Icons with white backgrounds and after dragging the file into the IDE I would have set white to be transparent in the inspector and see if that worked, but I can’t do that with Image sets as far as I can see.
I just tried this here and it appears to be working just fine as far as I can tell on Windows 10. Can you give us more information about what version of Windows you are using and are you building on your Mac or directly within Windows?
I use the Fatcow icons, which have transparent background, throughout Check Writer Windows toolbar, and have never seen what you describe. It could come from the picture files you are using.
All I know is that they are PNG icons I got with an Omegabundle, and they work fine in a Mac. (I updated my post above for the correct link for how they appear on a Mac)
OK: I just checked. My files with alpha channel (no surrounding white) are displayed correctly under Windows 10.
The only drawback is the filler Icon (the 32 x 32 icon is 653 bytes, nomask, png: copy from GIMP, Paste into Preview and save to disk as png) who holds nothing (not a single pixel !): it appears black.
I will add a discontinued vertical black line in the horizontal middle of the icon and this will be OK (or I will have to completely remove them if I need room for the other Icon I will have to add).
Karen: are your icons OK now (on Windows) ?
Linux user: can you told us the situation on Linux (Mint ?)
Edit:
I downloaded Greg project (and, sight, I cannot test it now *) and I check its icons / png files: these looks like mine: no white surrounding the circles.
(I do not set @x3 files)
I used a real PC laptop with a genuine Windows 10. I also have a boot HD with VirtualBox, and WIndows XP but (read below).
BTW: use Greg images just for a test as you know his project works or rename some of your icons and put them in Greg project !
I have only two USB (standard, not USB 3) ports on each of the two laptops: I have to think twice before doing something; it is easy to have both of them on use. Actually, I have an Elgato Diversity DVB (TNT) key on one and the TV target Hard Disk (to record a movie in some minutes) on the second: I cannot move anything to the PC laptop 'till the recording is done
I take an SD-Card at Kaufland, but the locked is lost: I cannot write to it from the MacBook Pro
(I used that to workaround the # of available USB ports ).
Karen, do you have a sample project to share? It might be helpful for us to see what the IDE is doing to your pngs. Perhaps some setting is causing some kind of issue because Greg’s project worked for you.
Hm. So I just imported your icons into three Image objects in a sample project and ran on both Windows 10 and Windows 7 and I still don’t see the results you are getting.
There is something odd about these files though… they’ve got extra metadata in them, including an extra hidden layer of info. I am sending them back to you with that info stripped to see if it fixes the problem on your end.
[quote=294334:@Greg O’Lone]Hm. So I just imported your icons into three Image objects in a sample project and ran on both Windows 10 and Windows 7 and I still don’t see the results you are getting.
There is something odd about these files though… they’ve got extra metadata in them, including an extra hidden layer of info. I am sending them back to you with that info stripped to see if it fixes the problem on your end.[/quote]
I still see the issue. I’m going to try the app on a real PC later today.