Transparent bitmap

hi,

does anyone know how to make parts of a bitmap transparent. I want
to have ‘black’ as the transparent color so i can move the object
over the background without of the black sourroundings of the
bitmap.

Thanks
Olli

“Oliver van Porten” wrote in message
news:38BD43C2.AB2A3AD7 at gmx.net

hi,

does anyone know how to make parts of a bitmap transparent. I want
to have ‘black’ as the transparent color so i can move the object
over the background without of the black sourroundings of the
bitmap.

Bitmap ? If you mean files .BMP, then it is not possible, you should convert
to .PNG.

Amedeo

SDL_SetColorKey() sets the trans color for blitting.–
Brian

On Wed, 1 Mar 2000, Oliver van Porten wrote:

hi,

does anyone know how to make parts of a bitmap transparent. I want
to have ‘black’ as the transparent color so i can move the object
over the background without of the black sourroundings of the
bitmap.

Thanks
Olli

Hmm, I think writing F.A.Q. for the SDL programming, wuoldn’t be a bad
idea :wink:

hayward at slothmud.org wrote:> SDL_SetColorKey() sets the trans color for blitting.


Brian

On Wed, 1 Mar 2000, Oliver van Porten wrote:

hi,

does anyone know how to make parts of a bitmap transparent. I want
to have ‘black’ as the transparent color so i can move the object
over the background without of the black sourroundings of the
bitmap.

Thanks
Olli

  • @G.Gabriele ---------------+
    | Linux |
    ±--------------- the free philosophy -+

Yeah
Q) How do i *?
A) RTM

:)On Wed, 1 Mar 2000, G.Gabriele wrote:

Hmm, I think writing F.A.Q. for the SDL programming, wuoldn’t be a bad
idea :wink:

hayward at slothmud.org wrote:

SDL_SetColorKey() sets the trans color for blitting.

Brian

On Wed, 1 Mar 2000, Oliver van Porten wrote:

hi,

does anyone know how to make parts of a bitmap transparent. I want
to have ‘black’ as the transparent color so i can move the object
over the background without of the black sourroundings of the
bitmap.

Thanks
Olli

  • g.gabriele at europe.com ---------------+
    | Linux |
    ±--------------- the free philosophy -+

Long live the confused,
Akawaka.

Bother! said Pooh, as the wind blew the smoke from his gun barrel.

hi,

does anyone know how to make parts of a bitmap transparent. I want
to have ‘black’ as the transparent color so i can move the object
over the background without of the black sourroundings of the
bitmap.

This is done in the Aliens demo game.

I do this:

if (SDL_SetColorKey(images[i], (SDL_SRCCOLORKEY),
SDL_MapRGB(images[i] -> format,
0xFF, 0xFF, 0xFF)) == -1)
{
… then an error occurred …
}

Of course, you want black to be transparent, so you want "0, 0, 0"
instead of “0xFF, 0xFF, 0xFF”…

-bill!

“Oliver van Porten” wrote in message
news:38BD43C2.AB2A3AD7 at gmx.net

hi,

does anyone know how to make parts of a bitmap transparent. I want
to have ‘black’ as the transparent color so i can move the object
over the background without of the black sourroundings of the
bitmap.

Bitmap ? If you mean files .BMP, then it is not possible, you should convert
to .PNG.

No, he means bitmap as in a bitmap.

One thing I’ve noticed about MicroSoft is their extremely unimaginative
names for things.

Their Disk Operating System is just called "DOS"
Their windowing system is just called "Windows"
Their word processor is just called "Word"
Their editor is called "edit"
Their bitmap file format is called “BitMaP”

-bill!

Q) How do i *?
A) RTM
^^^-- I thought there were 4 letters in that.–
Brian

Their bitmap file format is called “BitMaP”

What a silly name too… a “color bitmap”. Hrmmm…
To represent a color in a bit, they came up with some awesome compression
ratios, I’d say.

:-)–
Brian

I was being polite
RTM: Read The Manual
RTFM: Read The F**king ManualOn Wed, 1 Mar 2000 hayward at slothmud.org wrote:

Q) How do i *?
A) RTM
^^^-- I thought there were 4 letters in that.


Brian

Long live the confused,
Akawaka.

Bother, said Pooh as he got trapped in the printer.