Thread Tools Display Modes
05-13-12, 10:56 AM   #1
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 308
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?
  Reply With Quote
05-13-12, 12:01 PM   #2
Ailae
A Rage Talon Dragon Guard
 
Ailae's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2007
Posts: 318
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.
__________________
Oh, the simulated horror!
  Reply With Quote
05-13-12, 01:35 PM   #3
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
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.
__________________
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)
  Reply With Quote
05-17-12, 01:07 AM   #4
Zyonin
Coffee powered Kaldorei
 
Zyonin's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 1,443
Originally Posted by Cirax View Post
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.
__________________
Twitter

Last edited by Zyonin : 05-22-12 at 01:10 AM. Reason: Got hit with the debuff "Typos". /sigh
  Reply With Quote
05-18-12, 01:45 AM   #5
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
If you need some advise regarding textures you can PM me. I spent some time doing so.
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
05-18-12, 12:21 PM   #6
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 308
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
__________________
AddOns: Tim @ WoWInterface
Characters: Mage, Priest, Devoker, Pally
Battle Tag: Mysterio#11164
Current PC Setup: PCPartPicker List
  Reply With Quote
05-18-12, 06:45 PM   #7
Tim
A Rage Talon Dragon Guard
 
Tim's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2008
Posts: 308
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.
__________________
AddOns: Tim @ WoWInterface
Characters: Mage, Priest, Devoker, Pally
Battle Tag: Mysterio#11164
Current PC Setup: PCPartPicker List
  Reply With Quote
05-18-12, 07:03 PM   #8
lerb
A Frostmaul Preserver
 
lerb's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2008
Posts: 264
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!
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » UI Screenshots, Feedback and Design Discussion » Editing of tga files.

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