0

I have a picturebox with an image and a transparant label placed on top of it.

picturebox with label

The backcolor of the label is ARGB=(0, 255, 255, 255) which is transparent.

how can i get the color behind the label? e.g. RGB=(255,0,0)

Ben
  • 1
  • 2
  • 5
  • 19
  • No, the label is tranparant. I used the following code: mylabel.BackColor = Color.Transparent; mylabel.Parent = picturebox; – Ben Feb 04 '14 at 09:22

1 Answers1

1

I am not sure if fully understand your question. but if you need a color of image where the label is located then you may try out this-

 Bitmap bitmap = new Bitmap(pictureBox1.Image);
 Color colorAtPoint = bitmap.GetPixel(label1.Location.X, label1.Location.Y);
Ramashankar
  • 1,598
  • 10
  • 14
  • Very good. Is it possible to get the average RGB value from the whole label background and not just 1 pixel? – Ben Feb 04 '14 at 09:38