WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   AddOn Help/Support (https://www.wowinterface.com/forums/forumdisplay.php?f=3)
-   -   how to display a custom made .PNG image file in WoW (https://www.wowinterface.com/forums/showthread.php?t=56028)

linguini 02-09-18 02:59 AM

how to display a custom made .PNG image file in WoW
 
i am looking for a way to display a simple PNG image with transparency within wow.

My image file is 1920x1080, and my monitor is 1920x1080. I simply want to display this PNG image in wow. Is this possible?

(im asking because I was using kgpanels, but it is a bit heavy to use on my old laptop)

zork 02-09-18 04:38 AM

You can use the BLP to PNG converter.
http://www.wowinterface.com/download...Converter.html

Important. Your texture width/height needs to be a multiplier of 8.

16,32,64,128,256,512,1024 are possible values for width and height. The texture does not have to be square.

Not sure if a single texture can use 2048 in width/height yet. Try to save your texture in 2048x1024. If it loads OK. Otherwise I would try two 1024x1024 textures.

lightspark 02-09-18 07:24 AM

Well, in worst case scenario he can split the image into multiple pieces: 2048x1024 + 2048x64.

As zork said, you can't use PNGs, but you can use TGAs and BLPs, I use TGAs, most editors support export to TGA, moreover, unlike BLP TGA doesn't have artefact issues.

You will have some issues w/ PS and TGAs, Adobe really don't want to add auto alpha mask generation, so you'll have to either make your own, but it may be a PITA if you have really complex texture w/ semi-transparent objects of various colours, or save your image as PNG and later convert it to TGA :rolleyes:

Seerah 02-09-18 01:33 PM

Quote:

Originally Posted by zork (Post 326775)
Important. Your texture width/height needs to be a multiplier of 8.

It needs to be a power of 2. ;)

jeffy162 02-09-18 02:06 PM

Yes, it needs to be a power of two - IE 2, 4, 8, 16, 32, 64, etc., etc. :o (it gets too repetitive to continue). It goes up to (I think) 1024, but I've seen it (don't ask where because I really can't remember) go to 2048.

EDIT\ Since nobody has said it (yet, and they probably don't need to, either) - WoW doesn't support PNG graphics on a Windows machine. Blizzard, for some unknown reason, gave PNG support to Mac's though. Why? Don't know (and I really don't care, either).
\EDIT

linguini 02-09-18 02:35 PM

thank you all! so once I have a compatible format and size, how do I actually load this up into wow?

zork 02-09-18 03:35 PM

http://wowprogramming.com/docs/widge.../CreateTexture

If you manage to build a 2048x1024 texture you can do
Lua Code:
  1. local t = UIParent:CreateTexture(nil,"BACKGROUND",nil,-8)
  2. t:SetTexture("PATHTOYOURTEXTURE")
  3. t:SetAllPoints()

lightspark 02-10-18 12:30 AM

Quote:

Originally Posted by zork (Post 326790)
http://wowprogramming.com/docs/widge.../CreateTexture

If you manage to build a 2048x1024 texture you can do
Lua Code:
  1. local t = UIParent:CreateTexture(nil,"BACKGROUND",nil,-8)
  2. t:SetTexture("PATHTOYOURTEXTURE")
  3. t:SetAllPoints()

Nah, :SetAllPoints will ruin it, his screen res is 1920x1080 after all, so

Lua Code:
  1. t:SetPoint("TOPLEFT", 0, 0)

is a better way of anchoring it.


All times are GMT -6. The time now is 02:26 PM.

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