From 2f615cfdc7e084002a067f8c86cb16fcaab0ed3f Mon Sep 17 00:00:00 2001 From: James Jackson-South Date: Mon, 30 May 2016 23:45:19 +1000 Subject: [PATCH] Add usage comments Former-commit-id: 0555309a2862e24dbcfbce54f2b692de10c155f4 Former-commit-id: 168cc16706190b0067e1db06e912500284a8b24d Former-commit-id: 1bb43330a521100642bfbab85f3c052941b297c7 --- src/ImageProcessorCore/Formats/Bmp/BmpEncoderCore.cs | 1 + src/ImageProcessorCore/Formats/Gif/GifEncoderCore.cs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/ImageProcessorCore/Formats/Bmp/BmpEncoderCore.cs b/src/ImageProcessorCore/Formats/Bmp/BmpEncoderCore.cs index 890861d1e..2c4ffd694 100644 --- a/src/ImageProcessorCore/Formats/Bmp/BmpEncoderCore.cs +++ b/src/ImageProcessorCore/Formats/Bmp/BmpEncoderCore.cs @@ -42,6 +42,7 @@ namespace ImageProcessorCore.Formats rowWidth += 4 - amount; } + // Do not use IDisposable pattern here as we want to preserve the stream. EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Little, stream); int bpp = (int)this.bmpBitsPerPixel; diff --git a/src/ImageProcessorCore/Formats/Gif/GifEncoderCore.cs b/src/ImageProcessorCore/Formats/Gif/GifEncoderCore.cs index 55b2ab69a..c4846c44f 100644 --- a/src/ImageProcessorCore/Formats/Gif/GifEncoderCore.cs +++ b/src/ImageProcessorCore/Formats/Gif/GifEncoderCore.cs @@ -56,6 +56,7 @@ namespace ImageProcessorCore.Formats this.Quantizer = new OctreeQuantizer { Threshold = this.Threshold }; } + // Do not use IDisposable pattern here as we want to preserve the stream. EndianBinaryWriter writer = new EndianBinaryWriter(EndianBitConverter.Little, stream); // Ensure that quality can be set but has a fallback.