Board index » delphi » Delphi 2 : Color in form differend to a image background

Delphi 2 : Color in form differend to a image background

I have a problem with forms with a image display. I have a image picture (BMP)
with a gray background with color number xxx and i choose the same color number
on my form background color.  If i put the image into the form i see the background's
NOT the same, its differend (it think the background color on the image have a dark
gray). I hope someone can help me!

Best regards Thomas Froehlich
E-Mail: thomas froehl...@galaxycorp.com

 

Re:Delphi 2 : Color in form differend to a image background


In article <5ssltp$...@scesie10.sie.siemens.at>,
  thomas froehl...@galaxycorp.com wrote:

Quote

> I have a problem with forms with a image display. I have a image picture (BMP)
> with a gray background with color number xxx and i choose the same color number
> on my form background color.  If i put the image into the form i see the background's
> NOT the same, its differend (it think the background color on the image have a dark
> gray). I hope someone can help me!

You could set the background color of your form to match exactly the
color of the image as:

Color:=Image1.Bitmap.Canvas.Pixels[x0,y0]

where x0 and y0 are the coordinates of a pixel containing the background
color (for example 0,0).

Hope this helps,
NS

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet

Re:Delphi 2 : Color in form differend to a image background


It may be differences in the palette used to create the bitmap and the
default windows one. I have problems creating bitmaps in Paintshop pro
for example. Cant help any more than that.

In article <5ssltp$...@scesie10.sie.siemens.at>,
thomasfroehl...@galaxycorp.com writes

Quote
>I have a problem with forms with a image display. I have a image picture (BMP)
>with a gray background with color number xxx and i choose the same color number
>on my form background color.  If i put the image into the form i see the
>background's
>NOT the same, its differend (it think the background color on the image have a
>dark
>gray). I hope someone can help me!

>Best regards Thomas Froehlich
>E-Mail: thomas froehl...@galaxycorp.com

--
Claire Humphrey

Other Threads