given a path and filename how go i get the image object
Image image = ...(filename)
given a path and filename how go i get the image object
Image image = ...(filename)
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.)
If you're playing with images in memory, I've found that bobpowell.net has a GREAT site for GDI work in C#.
No.. I'm not related to, associated with or hired by Bob Powell. I just really enjoy his work. =)
// Get original filename with extention
string filenameWithPath = "C:\pictures\peanutbutterjellytime.jpg;
filename = System.IO.Path.GetFileName(filenameWithPath);