Browse Source

#395 fix

Former-commit-id: 9de97d7ab9a146c4d54d2f972942ec9d3c848da3
Former-commit-id: 9427516f117b7104e65de06196e4ab7e2a98be4e
Former-commit-id: 760cf311cd50c0c83b38a3226e1869b184d248f2
pull/1/head
Patrick Ammann 11 years ago
parent
commit
52c5ea07e8
  1. 5
      src/ImageProcessorCore/Formats/Bmp/BmpEncoderCore.cs
  2. 5
      src/ImageProcessorCore/Formats/Gif/GifEncoderCore.cs

5
src/ImageProcessorCore/Formats/Bmp/BmpEncoderCore.cs

@ -42,8 +42,8 @@ namespace ImageProcessorCore.Formats
rowWidth += 4 - amount; rowWidth += 4 - amount;
} }
using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Little, stream)) EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Little, stream);
{
int bpp = (int)this.bmpBitsPerPixel; int bpp = (int)this.bmpBitsPerPixel;
BmpFileHeader fileHeader = new BmpFileHeader BmpFileHeader fileHeader = new BmpFileHeader
@ -71,7 +71,6 @@ namespace ImageProcessorCore.Formats
writer.Flush(); writer.Flush();
} }
}
/// <summary> /// <summary>
/// Writes the bitmap header data to the binary stream. /// Writes the bitmap header data to the binary stream.

5
src/ImageProcessorCore/Formats/Gif/GifEncoderCore.cs

@ -56,8 +56,8 @@ namespace ImageProcessorCore.Formats
this.Quantizer = new OctreeQuantizer { Threshold = this.Threshold }; this.Quantizer = new OctreeQuantizer { Threshold = this.Threshold };
} }
using (EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Little, stream)) EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Little, stream);
{
// Ensure that quality can be set but has a fallback. // Ensure that quality can be set but has a fallback.
int quality = this.Quality > 0 ? this.Quality : imageBase.Quality; int quality = this.Quality > 0 ? this.Quality : imageBase.Quality;
this.Quality = quality > 0 ? quality.Clamp(1, 256) : 256; this.Quality = quality > 0 ? quality.Clamp(1, 256) : 256;
@ -97,7 +97,6 @@ namespace ImageProcessorCore.Formats
// TODO: Write Comments extension etc // TODO: Write Comments extension etc
writer.Write(GifConstants.EndIntroducer); writer.Write(GifConstants.EndIntroducer);
} }
}
/// <summary> /// <summary>
/// Writes the file header signature and version to the stream. /// Writes the file header signature and version to the stream.

Loading…
Cancel
Save