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

csharp Thailand
  • 9 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?

  • 9 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 is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson