WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Site help, bugs, suggestions/questions (https://www.wowinterface.com/forums/forumdisplay.php?f=18)
-   -   Transparent PNG Issue (https://www.wowinterface.com/forums/showthread.php?t=59564)

StormFX 04-26-23 11:17 AM

Transparent PNG Issue
 
I was updating some images and noticed that in some places, transparent PNGs are displayed with a black or white background. This is most notable on an add-on's description page, where it uses a black color. However, when viewing the image in the screenshot overlay, the background is white.

Dolby 04-26-23 11:20 AM

1 Attachment(s)
Very strange, can you show a screenshot when you get a chance? I'm not seeing any issue when looking at your Masque AddOn...

StormFX 04-26-23 11:25 AM

That's because I added a background color to match that section. You can see what I mean here:

https://www.wowinterface.com/downloads/info26494

I added a transparent image so that you can view it on the page and in the screenshot browser.

StormFX 04-26-23 11:28 AM

It looks like the API is doing some conversion and ignoring transparency. When viewing the image directly, this is the result:

Description Image:

https://cdn-wow.mmoui.com/preview/pvw75701_thumb.png

Screenshot Browser:

https://cdn-wow.mmoui.com/preview/pvw75701.png

Actual Image: (Older version, but still transparent)

https://wago-addons.ams3.digitalocea...k2HWBlrQPC.png

Dolby 04-26-23 11:28 AM

Ahh got it. Thanks for the heads up, will figure this out.

Dolby 04-26-23 11:30 AM

Was just going to say it has white background in browser https://cdn-wow.mmoui.com/preview/pvw75701.png. Possibly the browser is doing something inline to change it to a black background when its inline but not doing that same thing when viewing it in the screenshot overlay.

StormFX 04-26-23 11:33 AM

It's most likely that whatever script that does the conversion on the uploads for thumbnails and storage is ignoring or messing up the transparency. It works fine for my avatar in various places, for what it's worth.

Dolby 04-26-23 11:33 AM

Oh wait so when its made a thumbnail its black... https://cdn-wow.mmoui.com/preview/pvw75701_thumb.png


So yeah an issue on upload not keeping transparency and its doing it differently for the thumbnail and the large image. Will dive into this code, I dont think I've touched it in years. should be interesting :)

StormFX 04-26-23 11:36 AM

I mean, it's pretty old... what vBulletin code? :P

Dolby 04-26-23 11:37 AM

1 Attachment(s)
Nah, the image stuff for AddOns is separate. The vbulletin forum post image stuff probably works properly :D

Edit: Yep, vBulletin preserves the transparency.

StormFX 04-26-23 11:39 AM

Oh, for shame! Maybe you'll get lucky and it's simply a matter of adding/adjusting some parameters on some functions. :P

StormFX 05-07-23 08:48 PM

Figure it out yet? :)

SDPhantom 05-09-23 09:54 PM

It's been decades since I've worked with PHP, but one thing I'd check is if the relevant image pointers have transparency enabled.

For example, if you load the image in using GD, you need to run imagealphablending() to enable blending and imagesavealpha() to enable outputting the alpha channel using something like imagepng().

StormFX 11-07-23 02:25 PM

Any update on this?


All times are GMT -6. The time now is 04:53 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI