get Image object from path name
Another alternative is to use a Bitmap object (which inherits from Image) like so:
Bitmap bitmap = new Bitmap(imagePath);
(This works for all image formats, not just *.bmp as the name might imply.)
You want to call the static FromFile
method on the Image
class.