• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Noobish question about image

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
how to create a image what isnt square?
i created in paint a progressbar, imported into game and created via CreateImage and gived same height/width than the image in pixel and look weird in game
 

Attachments

  • 112.jpg
    112.jpg
    142.3 KB · Views: 152
  • test1.w3m
    16.9 KB · Views: 37
Level 14
Joined
Apr 20, 2009
Messages
1,543
how to create a image what isnt square?
i created in paint a progressbar, imported into game and created via CreateImage and gived same height/width than the image in pixel and look weird in game

Make sure you are using an image editing application that supports alpha channels. (Paint doesn't support it, try a free image editing application like GIMP or Paint.NET)
First remove the white background from your image. Then add an alpha layer in your Red, Green, Blue channels and remove the background that should be transparent from the alpha
(keep the rest that should be non-transparent inside the alpha layer. Usually this is a red layer on top of your original image.)

Now you should be abled to save that file as tga (which supports alpha channels), and convert it to blp. In order to have transparency in your image.

If you can't find out how to use alpha layers in the application that you're using, google it ;)
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
lol i dont talked about alpha and transparency....

it is a 171x21 pixel image, i dont need alpha or anything like that, just it is square in game, when it must be rect (like tube) so my problem is this image look dumb in game (game show the image but make bigger crap from it)
 

Attachments

  • 1.tga
    6 KB · Views: 65
Level 14
Joined
Apr 20, 2009
Messages
1,543
lol i dont talked about alpha and transparency....

it is a 171x21 pixel image, i dont need alpha or anything like that, just it is square in game, when it must be rect (like tube) so my problem is this image look dumb in game (game show the image but make bigger crap from it)

Oh, my mistake. I'll take a look at this when I get home okay?
 
Level 17
Joined
Nov 13, 2006
Messages
1,814
bump....

still i dont understand why scretch a image if i seted size same than the image size :/

why i cant set the size correctly?

JASS:
local image Img = CreateImage(udg_Background,width, height, 0, x,y, 0, 0, 0, 0, 1)
if width =10 and height =10 still it around 100x100 or bigger or if i make width = 16 and height = 128 still same size than with 10,10
 
You need to leave some pixels free in the sides of any image( with alpha channel ). To see what I mean:

attachment.php

I don't really know why, but if the image has borders you will get this error, to avoid it, leave in any image like 2px-5px in the sides.

Also, ubersplat has the same error.

I fixed your image, you should get this in-game:

attachment.php

New size:
JASS:
call CreateImage( "Textures\\New1.tga", 177, 18, 0, 0, 0, 10, 0, 0, 0, 2 )
 

Attachments

  • New1.tga
    12.5 KB · Views: 54
  • mm.jpg
    mm.jpg
    198.7 KB · Views: 237
  • newBar.jpg
    newBar.jpg
    94.4 KB · Views: 213
Level 17
Joined
Nov 13, 2006
Messages
1,814
lol now aint better :/ check pls the screenshot

have huge border what also not transparent (something like gray), size is far less than it must be etc
JASS:
local image img = CreateImage("Black.tga", 200, 1000, 1, 0, 0,1, 0, 0, 0, 1)
call SetImageRenderAlways(img, true)
call SetImageColor(img, 255, 255, 255, 200)
 

Attachments

  • WC3ScrnShot_120212_093802_02.jpg
    WC3ScrnShot_120212_093802_02.jpg
    143.2 KB · Views: 143
  • border problem.w3m
    16 KB · Views: 30
Status
Not open for further replies.
Top