CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 1999
    Posts
    36

    Question regarding DrawImage function

    I have a byte array with grey lavel values which I want to write out on the screen using preferably the DrawImage function, since this function takes Image and Rectangle as parameters. Is there a way in which I can use this function for writing out my byte array data to screen?
    How should I bring the byte array data into an Image object? Is it at all possible or do I have to use a completely different method?
    When doing the same in VC++ I simply used the DrawDibDraw function, but this option is not available in C# (or so I think).

  2. #2
    Join Date
    Nov 2002
    Location
    Singapore
    Posts
    1,890
    you can use
    Image.FromStream
    method . if you have a file then there is a Image.FromFile option. if you have a bytes then you can convert it thru stream and then use it or you could use Memorystream also...

    hope this works for you,
    if this doesn't solve for you then
    visit

    GOTDOTNET

    Paresh

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured