Write a way to read an image from a path to a bitmap object

 Posted by Puneet20884 on 2/26/2010 | Category: C# Interview questions | Views: 3685

We can directly read an image file and load it into a Bitmap object as below.
Bitmap myBmpObj = Bitmap.FromFile(strPath);

We can also set Image path during the Initilization of Bitmap Object. Code as given below.
Bitmap loBMP = new Bitmap(strPath);

Modified By:

Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response