problems in importing bmp files

Started by kantor_98, Wed 30/08/2006 10:29:27

Previous topic - Next topic

kantor_98

I have a bmp file that has only 5 squares on it, and the rest (shall we say background of the picture) is not existing. When I use art gem for example, the bacground is not existing, but after I import in AGS, the bacground becomes black. Has anybony an idea about what can i do ? This was happening whith a lot of pictures that I imported.
I have not use something else thn bmp files.
Thank you all

Gilbert

What did you mean by "not existing"? Was it transparent you meant?

What colour depth is your game in? If you're using 32-bit colour, the engine can import sprites with alph-channeled transparency only if it's in PNG format (BMP doesn't support transparent colours anyway).
If your game is in 16 bit colour or below, alpha-channels aren't supported, but you may mess with the sport import options so that it will choose your background colour as the transparent colour.

kantor_98

Yes, in fact I want that my backgrond color to be transparent, but i'm not knowing how to do this ins AGS !

Alynn

If you mean room background....

So basically you have an entire room background with 5 squares on it... What kind of a background is this?

When importing an image, no matter it's type, into the background of a room anything that is invisible/transperent is black. After all, if you put transparency on what is already the background, what would it show behind it? The inside of the monitor?

If you mean a normal sprite (for object or character or whatever)....

Now if you are talking something that is being used as a normal sprite, then most likely it's because when you import you are not using the correct pixel for the engine to determine what the transparent color should be...

For instance using palette number 0 works, but depending on the pain program, it may assign what color slot 0 is on itself... For example, in photoshop, it actually puts the transparent color at the end of the index, not in slot 0. Normally I always leave the top left pixel the same color as the background, even if that means I have to move the entire sprite over 1 pixel.

Have you looked at the file before importing into AGS? As mentioned before BMP doesn't support transperent pixels, so most likely artgem is saving the picture with either a solid white or solid black color (as per what most editors do in this case) to replace the transparent area of the image.

And lastly have you tried telling AGS to use a different pixel, perhaps one of your boxes is in the top right corner making that particular color transparent, but leaving the actual background...

Final note on Alpha transparency and the AGS Editor

Or finally, if you are using alpha channel (not using bmp) the AGS editor does not display alpha channels correctly, so even though in the editor itself it shows a big black area, once shown in game it will look as expected. This is of course if you are using 32bit color.

kantor_98

To alynn
OK, thankyou, now it is working.
I like the " After all, if you put transparency on what is already the background, what would it show behind it? The inside of the monitor?" issue !
Thanks adainn.

SMF spam blocked by CleanTalk