newbie question about bitmap
qqq m

Hi,
I started to learn allegro this weak and I have picture with black backgraund,
I want to do the backgtaund transperent and picture with full color.. can I do that?

and I have notic in one on the TuT ther is a command for that call "maske..." but I didn't understanding what it's do.

onther thing in the "blit" command the is the "screen" variable what his purpose
and can I chenge him?

SonShadowCat

If you're using something other than 8bit, then change the black to magic pink and use masked_blit(...) to make it transparent.

I'm sure you can find more info in the manual about 8bit if not a simple search.

Green Grasshopper

Hi there,

Welcome aboard.

The colors in computers are organized in ways that are presentable to the users and on backstage, there are arrangements for the color to show up to viewers that must be learned - this is up to you to program and make them look good.

The first thing I would suggest you, is SEARCH and BROWSE the forum, because it may be already answered there and you do not have to wait.
The second thing, is to take a look at the examples. Study them, do not read only. They are not there just to show how good the library is, they are actual implementations and very good ones.

But about your question:

blit - Copies a rectangular area from one bitmap to another. It is in the manual.(http://www.allegro.cc/manual).
Means you have a bitmap under your control - declared, initialized, under same colour depht, etc - and that you will copy it to another or to the screen. Remember your bitmaps must be declared, initialized, etc. etc.

screen is a special bitmap, which is your screen. So when you blit to screen, you will have your bitmap on the screen at runtime. Again, color depht, size, etc.

masked_blit will do the same, but a "magic colour" wich is called "MAGENTA" or RGB (maximum red and blue, zero green). The magenta will not superimpose on the previous bitmap, thus will be transparent.

Good luck.

Lucid Nightmare

why dont u do urself a favor and read the allegro documents which come with the allegro zip package after u've compiled them...

miran
Quote:

why dont u do urself a favor and read the allegro documents which come with the allegro zip package after u've compiled them...

y dont u do urself a favor and lrn how too speel? ;)

Thread #585983. Printed from Allegro.cc