diff options
| author | Luke <luke.pulverenti@gmail.com> | 2016-10-27 23:17:31 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-10-27 23:17:31 -0400 |
| commit | 57f83a2744fb5ebdf5774d51d2125ea46f4ce8ab (patch) | |
| tree | f0a8c9137d24160fe8e2955bff7010163f2d4066 /Emby.Drawing/GDI/GDIImageEncoder.cs | |
| parent | 8fcc7a0385b9db202c1f93ee897eb5a11d2759da (diff) | |
| parent | f6acc5fbff081728138564867a58b7848c92c467 (diff) | |
Merge pull request #2256 from MediaBrowser/dev
Dev
Diffstat (limited to 'Emby.Drawing/GDI/GDIImageEncoder.cs')
| -rw-r--r-- | Emby.Drawing/GDI/GDIImageEncoder.cs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Emby.Drawing/GDI/GDIImageEncoder.cs b/Emby.Drawing/GDI/GDIImageEncoder.cs index afd16899d..2fd2cac7e 100644 --- a/Emby.Drawing/GDI/GDIImageEncoder.cs +++ b/Emby.Drawing/GDI/GDIImageEncoder.cs @@ -7,7 +7,9 @@ using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; using System.Linq; -using CommonIO; +using MediaBrowser.Common.IO; +using MediaBrowser.Controller.IO; +using MediaBrowser.Model.IO; using ImageFormat = MediaBrowser.Model.Drawing.ImageFormat; namespace Emby.Drawing.GDI @@ -81,7 +83,7 @@ namespace Emby.Drawing.GDI { _fileSystem.CreateDirectory(Path.GetDirectoryName(outputPath)); - using (var outputStream = _fileSystem.GetFileStream(outputPath, FileMode.Create, FileAccess.Write, FileShare.Read, false)) + using (var outputStream = _fileSystem.GetFileStream(outputPath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, false)) { croppedImage.Save(System.Drawing.Imaging.ImageFormat.Png, outputStream, 100); } @@ -136,7 +138,7 @@ namespace Emby.Drawing.GDI _fileSystem.CreateDirectory(Path.GetDirectoryName(cacheFilePath)); // Save to the cache location - using (var cacheFileStream = _fileSystem.GetFileStream(cacheFilePath, FileMode.Create, FileAccess.Write, FileShare.Read, false)) + using (var cacheFileStream = _fileSystem.GetFileStream(cacheFilePath, FileOpenMode.Create, FileAccessMode.Write, FileShareMode.Read, false)) { // Save to the memory stream thumbnail.Save(outputFormat, cacheFileStream, quality); |
