diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-28 00:24:11 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-03-28 00:24:11 -0400 |
| commit | ec49a657525292b97c152027779b96274ed30685 (patch) | |
| tree | 3ef2a2fd0f75c2d107b3e45177c286ec5c6342bd /MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs | |
| parent | 1664de62c0571dc24e495f29e59f92a29a8b9b95 (diff) | |
correct dlna param positions
Diffstat (limited to 'MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs b/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs index 408d8c9b1..c6c1ec050 100644 --- a/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs +++ b/MediaBrowser.Server.Implementations/Drawing/ImageProcessor.cs @@ -218,36 +218,36 @@ namespace MediaBrowser.Server.Implementations.Drawing { var hasPostProcessing = !string.IsNullOrEmpty(options.BackgroundColor) || options.UnplayedCount.HasValue || options.AddPlayedIndicator || options.PercentPlayed.HasValue; - if (!hasPostProcessing) - { - using (var outputStream = await _mediaEncoder.EncodeImage(new ImageEncodingOptions - { - InputPath = originalImagePath, - MaxHeight = options.MaxHeight, - MaxWidth = options.MaxWidth, - Height = options.Height, - Width = options.Width, - Quality = options.Quality, - Format = options.OutputFormat == ImageOutputFormat.Original ? Path.GetExtension(originalImagePath).TrimStart('.') : options.OutputFormat.ToString().ToLower() - - }, CancellationToken.None).ConfigureAwait(false)) - { - using (var outputMemoryStream = new MemoryStream()) - { - // Save to the memory stream - await outputStream.CopyToAsync(outputMemoryStream).ConfigureAwait(false); - - var bytes = outputMemoryStream.ToArray(); - - await toStream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false); - - // kick off a task to cache the result - await CacheResizedImage(cacheFilePath, bytes).ConfigureAwait(false); - } - - return; - } - } + //if (!hasPostProcessing) + //{ + // using (var outputStream = await _mediaEncoder.EncodeImage(new ImageEncodingOptions + // { + // InputPath = originalImagePath, + // MaxHeight = options.MaxHeight, + // MaxWidth = options.MaxWidth, + // Height = options.Height, + // Width = options.Width, + // Quality = options.Quality, + // Format = options.OutputFormat == ImageOutputFormat.Original ? Path.GetExtension(originalImagePath).TrimStart('.') : options.OutputFormat.ToString().ToLower() + + // }, CancellationToken.None).ConfigureAwait(false)) + // { + // using (var outputMemoryStream = new MemoryStream()) + // { + // // Save to the memory stream + // await outputStream.CopyToAsync(outputMemoryStream).ConfigureAwait(false); + + // var bytes = outputMemoryStream.ToArray(); + + // await toStream.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false); + + // // kick off a task to cache the result + // await CacheResizedImage(cacheFilePath, bytes).ConfigureAwait(false); + // } + + // return; + // } + //} using (var fileStream = _fileSystem.GetFileStream(originalImagePath, FileMode.Open, FileAccess.Read, FileShare.Read, true)) { |
