Image transparancy
Displaying 1-15 of 15 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Wolf

I've spend hours making (*ripping* *cough*) beautiful fonts. The letters got this nice black shade next to them.
When I ran verge I only saw the white part without the black shade.
The reason was (as I found out) that I decreased the color depth to 256 colors (8bit) from 16 million(24bit). (because the font looked the same anyway).
Then it turned out this was the case with all images.

When TBlitting an image with a color depth of 256 all the dark colors go transparant. Not just death magenta.

Decreasing the color depth doesn't change the quality of my pictures, but cuts the size by about 70%. I use a lot of pictures, so I'd like to know how to deal with this.
I don't want to make a game with 2MB of pictures alone, when I can do with 700 kb.

Posted on 2004-09-28 11:22:48 (last edited on 2004-09-28 11:23:53)

mcgrue

Please post the images in question?

Posted on 2004-09-28 11:59:42

Zip

Select the pallet number of the black and add one to an rgb value?

Zip

Posted on 2004-09-28 12:29:31

RageCage

I have used gifs which are inherantly 256 colors and have had no problem with that. Try converting them to gif if they arn't already?

Posted on 2004-09-28 23:25:34

Omni

In a paletted image, the color at Index 0 is the transparent color under Verge.

Are you loading your images with LoadImage0()? That function loads paletted 256-color images in Verge.

Posted on 2004-09-28 23:39:45

blues_zodiakos

I thought that index 0 is ONLY transparent when loading images with LoadImage0. I tried loading 2 sets of gifs though, and I couldn't get transparency to work with either LoadImage or LoadImage0 without manually setting the transparent color though. Of course, if ALL of your files don't use the same color for transparency, that last option isn't going to help you much.

Posted on 2004-09-29 17:15:20

Omni

Manually setting the transparent color? Can you change the transparent color from magenta?

Posted on 2004-09-29 19:10:24

blues_zodiakos

Yip. I think the variable is 'transcolor'. Its an RGB value.

Posted on 2004-09-30 03:27:16

Omni

Dude that's awesome.

Posted on 2004-09-30 03:57:23

blues_zodiakos

The solution to my problem was to convert each of the gifs to a png. That also required editing the backgrounds of 772(!) gifs so that the background color was exactly magenta because when converted to png (with photoshop), the paletted colors are converted into their rgb values (which very rarely will be the color you want) :( Your mileage may vary.

Posted on 2004-09-30 04:16:01

rpgking

Wow, I thought that transcolor was read-only. I didn't know it was read/write...

Posted on 2004-10-01 08:57:37

Wolf

Allright. Sorry for my late reply, I didn't had any internet access for a while.

It took some time to find an example, but here are 2 snaps from my battlesystem (under heavy development).


As you can see in the second picture. The dark colors on player character are transparant.
The difference between the pictures is that the first one uses 16 million and the last one 256 colors.

But changing from loadimage0 to loadimage did the trick.
Thanks all.

Posted on 2004-10-01 15:05:49

mcgrue

Man. Everytime I see that picture, I hear the opening chords to that battle theme.

Which makes visiting [zeromus.org] all the more amusing.

Edit: btw, If we ever need prrof that Zeromus truly is a genius, we need look no further than his front page, where you find this:

Posted on 2004-10-01 15:40:44 (last edited on 2004-10-01 15:42:32)

Zip

I nearly said 'Change from LoadImage0', but seeing as it's in the docs and very clear as to the function, thought it'd be a bit rude. Well, glad its fixored.

Zip

Posted on 2004-10-01 15:49:00

Wolf

Well, the problem is solved for images.
My pictures where actually animations and I used the animation.vc included which loads the image with Loadimage0.

But I still have the same problem for fonts. I can't load these any other way. The fonts are loaded like Loadimage0 with the first palette index transparant. Giving my font no more nice shade.

I guess I sound picky. Fonts are small anyway so it doesn't matter too much to make it 16 million colors.
Forget my rambling...

Posted on 2004-10-10 18:07:21


Displaying 1-15 of 15 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.