I need to read the metadata of an image, display it on the screen and allow
the user to change it and then re-write the metadata back into the image.
The issue I am having is if I try to rename or delete the existing image
before re-writing the image file I get an error stating that the image is in
use. I am using Image.FromFile() to read the file. I have tried disposing
of the image and running the garbage collector (GC.Collect()), but it still
doesn't work. Is there a way to actually close the file so I can
delete/rename it?
Thanks,
Tim