Browse Source

Merge pull request #57 from LaurentiuMM/master

Caching images having a different internal format vs file extension

Former-commit-id: 781f04757feefd94bb90a6451c39ca5e2771a230
af/merge-core
James South 12 years ago
parent
commit
2147002cd9
  1. 4
      src/ImageProcessor/ImageFactory.cs

4
src/ImageProcessor/ImageFactory.cs

@ -874,9 +874,9 @@ namespace ImageProcessor
int length = filePath.LastIndexOf(".", StringComparison.Ordinal);
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.

Loading…
Cancel
Save