Thread Tools Display Modes
04-26-23, 11:17 AM   #1
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
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.
__________________
Add-On List

  Reply With Quote
04-26-23, 11:20 AM   #2
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,339
Very strange, can you show a screenshot when you get a chance? I'm not seeing any issue when looking at your Masque AddOn...
Attached Thumbnails
Click image for larger version

Name:	Screenshot 2023-04-26 at 12.20.04 PM.jpg
Views:	24
Size:	171.4 KB
ID:	9809  
  Reply With Quote
04-26-23, 11:25 AM   #3
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
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.
__________________
Add-On List

  Reply With Quote
04-26-23, 11:28 AM   #4
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
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
__________________
Add-On List


Last edited by StormFX : 04-26-23 at 11:38 AM. Reason: Link images to prevent vertical scrolling nonsense. :P
  Reply With Quote
04-26-23, 11:28 AM   #5
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,339
Ahh got it. Thanks for the heads up, will figure this out.
  Reply With Quote
04-26-23, 11:30 AM   #6
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,339
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.
  Reply With Quote
04-26-23, 11:33 AM   #7
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
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.
__________________
Add-On List

  Reply With Quote
04-26-23, 11:33 AM   #8
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,339
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
  Reply With Quote
04-26-23, 11:36 AM   #9
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
I mean, it's pretty old... what vBulletin code? :P
__________________
Add-On List

  Reply With Quote
04-26-23, 11:37 AM   #10
Dolby
PPAP
 
Dolby's Avatar
WoWInterface Admin
Join Date: Feb 2004
Posts: 2,339
Nah, the image stuff for AddOns is separate. The vbulletin forum post image stuff probably works properly

Edit: Yep, vBulletin preserves the transparency.
Attached Thumbnails
Click image for larger version

Name:	wowi-dragonflight-logo-sm.png
Views:	22
Size:	38.5 KB
ID:	9810  

Last edited by Dolby : 04-26-23 at 11:39 AM.
  Reply With Quote
04-26-23, 11:39 AM   #11
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
Oh, for shame! Maybe you'll get lucky and it's simply a matter of adding/adjusting some parameters on some functions. :P
__________________
Add-On List

  Reply With Quote
05-07-23, 08:48 PM   #12
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
Figure it out yet?
__________________
Add-On List

  Reply With Quote
05-09-23, 09:54 PM   #13
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
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().
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 05-09-23 at 11:55 PM.
  Reply With Quote
11-07-23, 02:25 PM   #14
StormFX
A Flamescale Wyrmkin
 
StormFX's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2006
Posts: 109
Any update on this?
__________________
Add-On List

  Reply With Quote

WoWInterface » Site Forums » Site help, bugs, suggestions/questions » Transparent PNG Issue

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off