I use this line below for create my Bitmap:
Bitmap b = new Bitmap(@"C:\<file name>");
After I modify this bitmap and I want to save it as in line below:
b.Save(@"C:\\<other file name>")
My question is – how to get the file name bitmap from property.
Simply put, I need to save the bitmap with the same name with whom I had initiated it.
Thanks
Perhaps you can do this with Metadata – but I’m not familiar with this subject so I’m not completely sure it’s possible, nor do I how to do it.
What I do suggest is make a type.
So for example you can create a class which will have a Bitmap(1) property for the image, and a string for the file’s path.
And use it like so:
(1) Consider using the Image class instead. It’s the base class of Bitmap. If you’re not sure which one to use ask yourself if your class requires an image or an image of that exact format (that is, bitmap).