WoWInterface

WoWInterface (http://www.wowinterface.com/forums/index.php)
-   UI Screenshots, Feedback and Design Discussion (http://www.wowinterface.com/forums/forumdisplay.php?f=144)
-   -   Editing of tga files. (http://www.wowinterface.com/forums/showthread.php?t=43434)

Tim 05-13-12 10:56 AM

Editing of tga files.
 
I'm trying to remake the NurfedHUD_TwinDragons using oUF and it works for the most part. All of the tga files have about 250px worth of empty space on the top of the image. I've can successfully trim all the excess space in PhotoShop CS5 but, when I go to use the image in the layout I get a default bar as if it had no texture. The images are single layer files so I have to unlock them and I think that's where the problem occurs. I've tried using SetTexCoord but all that ends up doing is stretching the image.

Any suggestions?

Ailae 05-13-12 12:01 PM

Images has to have sizes that are a power of 2, eg. 2, 4, 16, 32, 64, 128, 256, 512, 1024 pixels.

Chances are those 250 px of emptiness is padding so the image will fit that critera.

SDPhantom 05-13-12 01:35 PM

Whenever you call texture:SetTexCoord() to trim an image, you need to set the texture container to the new size too using texture:SetSize() or a combination of texture:SetWidth() and texture:SetHeight() or the image stretches like that. Note the container size is in pixels while the texture coords are as a percentage.

Zyonin 05-17-12 01:07 AM

Quote:

Originally Posted by Cirax (Post 256329)
I'm trying to remake the NurfedHUD_TwinDragons using oUF and it works for the most part. All of the tga files have about 250px worth of empty space on the top of the image. I've can successfully trim all the excess space in PhotoShop CS5 but, when I go to use the image in the layout I get a default bar as if it had no texture. The images are single layer files so I have to unlock them and I think that's where the problem occurs. I've tried using SetTexCoord but all that ends up doing is stretching the image.

Any suggestions?

As the poster after you noted, the images need to be in powers of two. In addition, TGA files need to have an alpha channel. I have always found tga files to be a bit fincky to work with as some image editors like tga files and others don't. I usually find it's easier to work with PNGs (convert your TGA to PNG using your editors "Save as.." or "Export" commands) then using PNG2BLP (found here on WoWI), convert them to WoW friendly BLP files. No fussing with alpha channels or finicky image editors.

zork 05-18-12 01:45 AM

If you need some advise regarding textures you can PM me. I spent some time doing so. :)

Tim 05-18-12 12:21 PM

Been a bit busy lately but, just downloaded BLP2PNG and will give that a whirl when I'm done my lawn work and go from there.

I'll holler at you zork if I run into more problems. :P

Tim 05-18-12 06:45 PM

PNG2BLP truly indeed has seem to make this much easier. Converting to png and altering dimensions and then back to blp is going pretty well. Back to working on this hud or full blown style, haven't decided yet.

lerb 05-18-12 07:03 PM

If you get tired of converting back and forth I'd recommend Paint.net, it's doing the job for me! Handles .tga files very well :)

Edit: It's late, I didn't realize you were talking about .png and .blp. Sorry! :(


All times are GMT -6. The time now is 06:31 AM.

vBulletin © 2014, Jelsoft Enterprises Ltd
©2012 ZAM Network LLC