Paint a pixel in C#

Last post 07-02-2009 12:37 AM by khparhami. 1 replies.

Sort Posts:

  • Paint a pixel in C#

    06-30-2009, 11:42 AM
    • Member
      145 point Member
    • ash_forumsasp
    • Member since 04-27-2008, 11:20 AM
    • Posts 41

    Hi All,

      I am using Graphics object in C# and using that I just simply want to draw a pixel, but I am unable to found out how to do it? I tried using DrawEllipse or DrawRectangle for that but that draw a bolder pixel i.e. they are not drawing a single pixel.

    Can anyone help me out with this.

    Thanx in advance

    Filed under:
  • Re: Paint a pixel in C#

    07-02-2009, 12:37 AM
    Answer
    • Member
      409 point Member
    • khparhami
    • Member since 04-09-2009, 1:19 AM
    • Tehran
    • Posts 189

     Hi,

    As I know, to change one pixel coloure you have to use Bitmap Class and the setPixel and getPixel methods.

    obviusly these methods work on bitmaps only and you have to have a bitmap image first.

    Best regards
    Khashayar

    ---------------------------------------------
    Please: Don't forget to click "Mark as Answer" on the post that helped you. That way future readers will know which post solved your issue.
Page 1 of 1 (2 items)