Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to change bitmap background color?

1 view
Skip to first unread message

Mike

unread,
Sep 6, 2005, 4:20:56 PM9/6/05
to
Hi

How can I change bitmap background color

Thanks

-Mike


Charles Hacker

unread,
Sep 6, 2005, 7:40:41 PM9/6/05
to
Mike wrote:
>
> How can I change bitmap background color

With so little information given, it is difficult to know what you
really want.

- Are you asking about transparency?

- What type of bitmap (DDB, DIB, pixel type?)

- Did you want to change an exact color, or do you want a 'magic wand'
type colour selector.
That is, how close do colours need to be, for it to be considered as
'the backgroud'.

--
Charles Hacker
Lecturer in Electronics and Computing
School of Engineering
Griffith University - Gold Coast
Australia

theo

unread,
Sep 7, 2005, 6:39:08 AM9/7/05
to
Charles Hacker schrieb:

> Mike wrote:
>
>>How can I change bitmap background color
>
>
> With so little information given, it is difficult to know what you
> really want.

Or maybe he just wants to fill the bitmap canvas with a color:

with Bmp.Canvas do begin
Brush.Color := clred;
Brush.Style := bsSolid;
FillRect(0,0,Bmp.Width, Bmp.Height)
end;

Peter Below (TeamB)

unread,
Sep 7, 2005, 1:59:40 PM9/7/05
to
In article <431d...@newsgroups.borland.com>, Mike wrote:
> How can I change bitmap background color

A bitmap has no background and no foreground, it is a single layer of
pixels. Back- and foreground are purely human interpretations.

If you draw something on the bitmaps canvas the brush color can be
considered a background color and the pen or font color the foreground
color. The brush will be used to fill the blank space inside and
between letters drawn via Textout, for example, or to fill a rectangle
or other geometric figure.


--
Peter Below (TeamB)
Use the newsgroup archives :
http://www.mers.com/searchsite.html
http://www.tamaracka.com/search.htm
http://groups.google.com
http://www.prolix.be


Ronaldo Souza

unread,
Sep 8, 2005, 9:29:35 PM9/8/05
to
Mike wrote:
>
> How can I change bitmap background color
>

If you mean the color used as transparent background in button
glyphs, try this:

BMP.Canvas.Pixels[0,BMP.Height-1] := MyNewColor;

Good luck,
Ronaldo


0 new messages