Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write .NET screenshots using the Save overload that takes a FileStream
Rather than using the Image.Save overload that takes a string containing the file name, we should use a System.IO.FileStream. The FileStream object handles validating the existence of the path to which one is attempting to write, so this will avoid the cryptic GDI+ error that occurs if the file already exists. Additionally, the SaveAsFile method now does what it says on the tin, that the file will be overwritten if it already exists. Fixes issue #4645.
- Loading branch information