Thread Tools Display Modes
05-27-07, 08:51 AM   #1
Felankor
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 26
Question Problem creatnig images for my addon

Hi,

I want to create an image for my minimap button. But when I use it in game I just get a green square...

I'm making the image in PNG format and then converting it to BLP with BLP2PNG.

The canvas size of the image is 32x32 (I've heared that it has to be a multiple of 16)

The image is being saved as a 32bit PNG file before its converted.

The background of the image is transparent.

Anyone know why its just appearing as a green square?
  Reply With Quote
05-27-07, 09:01 AM   #2
Dreadlorde
A Pyroguard Emberseer
 
Dreadlorde's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 2,302
I think i's a multiple of 2 (2,4,8,16,32,64,128,256,512)
__________________

Funtoo - Plan 9 - Windows 7
  Reply With Quote
05-27-07, 09:11 AM   #3
Zyonin
Coffee powered Kaldorei
 
Zyonin's Avatar
AddOn Author - Click to view addons
Join Date: May 2006
Posts: 1,443
You may want to try converting the PNG to a .tga using a program like The GIMP (which using the standard setting, produces WoW friendly tgas). This what I do when I create custom images and textures for use in game. You file has be mutilples of 16, 32, 64, 128, 256, or 512 or any combo therein such as 32x16

BLPs can be a bit tricker as that is a Blizzard format and can be changed at Blizzard's whim. If you are using an older version, it may not produce WoW friendly BLPs.
__________________
Twitter

Last edited by Zyonin : 05-27-07 at 09:14 AM.
  Reply With Quote
05-27-07, 09:46 AM   #4
Felankor
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 26
I downloaded the gimp and converted the png to tga.

But im still getting a green square.
  Reply With Quote
05-27-07, 10:33 AM   #5
Dreadlorde
A Pyroguard Emberseer
 
Dreadlorde's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2006
Posts: 2,302
is it the right dimensions? did you code something wrong? double check you work, I think minimap buttons are usually 32x32 aren't they?
__________________

Funtoo - Plan 9 - Windows 7
  Reply With Quote
05-27-07, 11:40 AM   #6
Felankor
A Fallenroot Satyr
AddOn Author - Click to view addons
Join Date: May 2007
Posts: 26
Its working now. Thanks for the help all.
  Reply With Quote
05-27-07, 04:11 PM   #7
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Power of 2. Thus, why it can be 32 or 64 but not anything in between.

Anyway, glad you got it working.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
01-08-08, 03:20 PM   #8
Wadsworth
A Murloc Raider
 
Wadsworth's Avatar
Join Date: Jul 2006
Posts: 4
i know he already got it working but aside from being a multiple of 2 it has to be uncompressed and 32bit
  Reply With Quote
02-05-08, 09:28 AM   #9
phelaan
A Murloc Raider
Join Date: Jan 2008
Posts: 5
Might be off-topic, but anyway:
I've had that similar experience with the green square. And im aware you solved it, but i'd love to hear if anyone know excactly why it sometimes works and sometimes it dont?

I've noticed a few times that when ive saved my image in tga32bit uncompressed, and reopen it, that it have ditched my alpha channel. No idea really why, but i usally fiddle around with it a bit and finally get it to work. So if anyone have a clue to what excactly makes the difference. pls post so.
  Reply With Quote
02-05-08, 09:57 AM   #10
Shirik
Blasphemer!
Premium Member
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2007
Posts: 818
Originally Posted by phelaan View Post
Might be off-topic, but anyway:
I've had that similar experience with the green square. And im aware you solved it, but i'd love to hear if anyone know excactly why it sometimes works and sometimes it dont?

I've noticed a few times that when ive saved my image in tga32bit uncompressed, and reopen it, that it have ditched my alpha channel. No idea really why, but i usally fiddle around with it a bit and finally get it to work. So if anyone have a clue to what excactly makes the difference. pls post so.
It always works if done correctly. You just have to follow all the rules:

- Width and height must be a power of two
- Color depth must be 24-bit (8x8x8)
- 8-bit alpha channel must be present (thus making a 32 bit depth)
- Image must be uncompressed
- Image must either be TGA or BLP (or PNG? I've never used that one but heard of it being tried before.)

8R8G8B8A for those of you DX guys, and for the rest of you, just follow the rules above :P If you follow those rules and place the image in the right folder, you won't have a problem.
__________________
たしかにひとつのじだいがおわるのお
ぼくはこのめでみたよ
だけどつぎがじぶんおばんだってことわ
しりたくなかったんだ
It's my turn next.

Shakespeare liked regexes too!
/(bb|[^b]{2})/
  Reply With Quote
02-13-08, 07:20 AM   #11
Pfeifer
A Defias Bandit
Join Date: Feb 2008
Posts: 2
Hello,
can you say me how do you do to load your image into WoW so that it's change the existing one ? I want to modify ingame icon but i dont know how to load the modified picture.
Thanks
  Reply With Quote

WoWInterface » Developer Discussions » Graphics Help » Problem creatnig images for my addon

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