How can i convert image type to bitmap type in c#.net

csharp Thailand
  • 11 years ago
     i have an image that is image type

    but i have to use it in some function that need input in bitmap type

     

    How can i convert  image type to bitmap type?

  • 11 years ago

    Hi Ki_Ki,

    You can create a Bitmap object with a constructor that takes an image as a parameter.  This creates a bitmap from the image.

    Code Sample

    Bitmap

    a = new Bitmap(myImage);

    Regards,

    Adrian.

Post a reply

Enter your message below

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer lets you make more mistakes faster than any other invention in human history, with the possible exceptions of handguns and tequila” - Mitch Ratcliffe