Forum

> > Off Topic > BMP Transparency
Forums overviewOff Topic overviewLog in to reply

English BMP Transparency

16 replies
To the start Previous 1 Next To the start

old BMP Transparency

maPmaKer
User Off Offline

Quote
Hello,

I am working on a new map and also I have mixed some tilesets I had in the CS2D folder into a big one. Then I saved the big tileset as PNG and went in-game to start mapmaking.

The problem : It takes a bit too long for CS2D to load the PNG tileset and almost 0 seconds to load a BMP tileset.

The PNG tileset helped me with some transparent spots, but if I save to BMP, the transparent spots turn into white or black (this happends if I save it to a 4,8,16,24 - bit image) , if I save the BMP as 32-bit, all tiles turn transparent.

Please explain this thing to me. How I can turn a PNG into BMP, without loss of transparency?

Thank you,
maPmaKer

old Re: BMP Transparency

Jela331
User Off Offline

Quote
@maPmaKer
In older versions of CS2D,maximun tiles are 256.
I think that's your problem,if u mean that...

old Re: BMP Transparency

Ice-cream16
User Off Offline

Quote
You should in the settings folder, uncheck the "hide file extensions" and rename yourtileset.bmp to yourtileset.png √

old Re: BMP Transparency

united
User Off Offline

Quote
As far as I know there's no possible transparency with .bmp since it's a bit map and there's no 'invisible' colors/bits.

old Re: BMP Transparency

The Spy
User Off Offline

Quote
user united has written
As far as I know there's no possible transparency with .bmp since it's a bit map and there's no 'invisible' colors/bits.


Actually it is, and there is a file here on US wich have it.

old Re: BMP Transparency

Flacko
User Off Offline

Quote
user united has written
As far as I know there's no possible transparency with .bmp since it's a bit map and there's no 'invisible' colors/bits.

32 bit bitmaps do support alpha channel so it's possible. Mspaint doesn't support 32b bitmaps (yet?) so it's not very common to find this kind of bitmaps.

You should keep your file as a png anyways since png is better for file transmission because it usually results in smaller files through compression algorithms and fucking computer wizardry.

PS: Photoshop likes overloading .png headers with shit. Try to get a more efficient (and specific) tool if you want to save a few bytes. I personally used the superPNG plugin for Photoshop.

old Re: BMP Transparency

maPmaKer
User Off Offline

Quote
Thank you for your answers.

@Flacko - Thank you. Really useful what you said. Anyway, the BMP tileset has 1000Kb and the PNG one has only 445Kb so it's a win for PNG. I already knew that PNG is a lot more lighter then other types.

@Jela331 - Nope, I respect the limits and I don't have more then 256.

So, now I'm gonna use PNG, but you'll have to wait some seconds (maximum 5) to load the map when I'll release it.

Thank you,
maPmaKer

old Re: BMP Transparency

maPmaKer
User Off Offline

Quote
Woohoo! I have found the solution myself. And there's no need on Photofiltre Sutdio X or other tools, Photoshop is doing it best.

1. First make sure that all the areas you want to be transparent are in magneta (fusia) color or black/white.

2. Go into "Image" > "Mode" and select "Index Color".

3. At transparent colors put the magneta color (255,0,255) and press "Ok". Your image will be indexed.

4. Save the file as BMP.

And you'll have that areas transparent.

∗ Best Part > The indexed color makes the image file even lighter then the PNG, so if the normal BMP image has 1000KB size, your indexed image will have only 257KB, which is lighter then the PNG (445KB).

Thank you guys for your help, but looks like I found it myself.

old Re: BMP Transparency

Alistaire
User Off Offline

Quote
user Vetle has written
Finnaly there's a person who cares about file sizes.


And indexed files aren't that big in the CS2D map. They use really much space in your computer's hidden maps/system maps, and because I don't indexate any file, most tilesets are crashing.

Please just make it a big file without indexated stuff. It's really not that great.

old Re: BMP Transparency

Majatek
User Off Offline

Quote
user Ice-cream16 has written
You should in the settings folder, uncheck the "hide file extensions" and rename yourtileset.bmp to yourtileset.png √
No, just no, no no no no.

Never change the file extension of a file to another extension and hope it to work. It's like changing a .exe into a .app and hoping it to work on a Macintosh. It probably won't.

Now I'm going to advertise Paint.NET again, because you know why? It uses colour palettes and compression techniques - You actually get to slide a bar from left to right before you click "yes, save the image" or whatever it's called, and it will automatically adjust the quality of the image relatively to the bar that you've been sliding about. If the bar is slid all the way to the right, you'll get best graphical performance and quality, but with a very large file, if the bar is slid all the way to the left, you end up with a small file, but the trade off is that it isn't nearly as pretty looking as the high-quality one.

The other technique in creating a small file for a tileset is to use as little colours as possible - For example: Don't use gradients, but rather dither colours instead. But that'll be harder for you guys, so really the only quick and easy option is to not use MS Paint and start using Gimp, Paint.NET, Photoshop or Paint Shop Pro.

old Re: BMP Transparency

maPmaKer
User Off Offline

Quote
user Alistaire has written
user Vetle has written
Finnaly there's a person who cares about file sizes.


And indexed files aren't that big in the CS2D map. They use really much space in your computer's hidden maps/system maps, and because I don't indexate any file, most tilesets are crashing.

Please just make it a big file without indexated stuff. It's really not that great.


This works perfectly! And if I remember well, cs_assault has indexed tileset.
To the start Previous 1 Next To the start
Log in to replyOff Topic overviewForums overview