Browse Source

Merge pull request #57 from LaurentiuMM/master

Caching images having a different internal format vs file extension

Former-commit-id: d62bad86c8cc14a3f5d82dd4d79bfa5c7fe7d764
pull/17/head
James South 12 years ago
parent
commit
2b9afeb776
  1. 4
      src/ImageProcessor/ImageFactory.cs

4
src/ImageProcessor/ImageFactory.cs

@ -874,9 +874,9 @@ namespace ImageProcessor
int length = filePath.LastIndexOf(".", StringComparison.Ordinal); int length = filePath.LastIndexOf(".", StringComparison.Ordinal);
string extension = this.ImageFormat.GetFileExtension(this.OriginalExtension); string extension = this.ImageFormat.GetFileExtension(this.OriginalExtension);
if (!string.IsNullOrWhiteSpace(extension)) if (length == -1)
{ {
filePath = length == -1 ? filePath + extension : filePath.Substring(0, length) + extension; filePath = filePath + extension;
} }
// Fix the colour palette of indexed images. // Fix the colour palette of indexed images.

Loading…
Cancel
Save