In System.Drawing class, how to report pixel value RRS feed

  • Question

  • Hello

      Suppose I have a canvas with some filled-color objects (rectangles, ellipses). How do I get values of pixels or areas of the drawing canvas so that scanning through all these areas can generate responses and report back area locations of changes in these values? There are numerous classes that seem to have these features but they may not work with the System.Drawing class, I'm not sure about this.

    Thanks, JJS


    Thursday, February 15, 2018 10:13 PM


  • Hello,

     It not easy to get a single pixel color value. You must capture the Region of the Form/Screen

    into a Bitmap and then use the method Bitmap.GetPixel( x, y )  Because Windows Desktop

    Manager does not allow direct access. Read the information at the following link;


     Hope this helps :)

    Thursday, February 15, 2018 11:42 PM