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.
|
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...
|
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. |
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 |
Ahh got it. Thanks for the heads up, will figure this out.
|
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.
|
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.
|
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 :) |
I mean, it's pretty old... what vBulletin code? :P
|
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. |
Oh, for shame! Maybe you'll get lucky and it's simply a matter of adding/adjusting some parameters on some functions. :P
|
Figure it out yet? :)
|
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(). |
Any update on this?
|
All times are GMT -6. The time now is 02:54 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI