How can i convert image type to bitmap type in

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


    a = new Bitmap(myImage);



Post a reply

Enter your message below

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


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.

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” - Antoine de Saint Exupéry