Browse Source

Silence warnings.

af/merge-core
Dirk Lemstra 9 years ago
parent
commit
cf8fce7df1
  1. 2
      src/ImageSharp/Formats/Gif/GifEncoder.cs
  2. 2
      src/ImageSharp/Processing/Processors/CloningImageProcessor.cs
  3. 2
      src/ImageSharp/Processing/Processors/ImageProcessor.cs
  4. 10
      tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs

2
src/ImageSharp/Formats/Gif/GifEncoder.cs

@ -44,7 +44,7 @@ namespace SixLabors.ImageSharp.Formats.Gif
public void Encode<TPixel>(Image<TPixel> image, Stream stream) public void Encode<TPixel>(Image<TPixel> image, Stream stream)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
GifEncoderCore encoder = new GifEncoderCore(this); var encoder = new GifEncoderCore(this);
encoder.Encode(image, stream); encoder.Encode(image, stream);
} }
} }

2
src/ImageSharp/Processing/Processors/CloningImageProcessor.cs

@ -27,7 +27,7 @@ namespace SixLabors.ImageSharp.Processing
throw new ImageProcessingException($"An error occured when processing the image using {this.GetType().Name}. The processor changed the number of frames."); throw new ImageProcessingException($"An error occured when processing the image using {this.GetType().Name}. The processor changed the number of frames.");
} }
var configuration = source.GetConfiguration(); Configuration configuration = source.GetConfiguration();
this.BeforeImageApply(source, clone, sourceRectangle); this.BeforeImageApply(source, clone, sourceRectangle);
for (int i = 0; i < source.Frames.Count; i++) for (int i = 0; i < source.Frames.Count; i++)

2
src/ImageSharp/Processing/Processors/ImageProcessor.cs

@ -20,7 +20,7 @@ namespace SixLabors.ImageSharp.Processing
{ {
try try
{ {
var config = source.GetConfiguration(); Configuration config = source.GetConfiguration();
this.BeforeImageApply(source, sourceRectangle); this.BeforeImageApply(source, sourceRectangle);
foreach (ImageFrame<TPixel> sourceFrame in source.Frames) foreach (ImageFrame<TPixel> sourceFrame in source.Frames)

10
tests/ImageSharp.Tests/Formats/Png/PngEncoderTests.cs

@ -28,10 +28,10 @@ namespace SixLabors.ImageSharp.Tests
{ {
using (Image<TPixel> image = provider.GetImage()) using (Image<TPixel> image = provider.GetImage())
{ {
PngEncoder options = new PngEncoder() var options = new PngEncoder()
{ {
PngColorType = pngColorType PngColorType = pngColorType
}; };
provider.Utility.TestName += "_" + pngColorType; provider.Utility.TestName += "_" + pngColorType;
provider.Utility.SaveTestOutputFile(image, "png", options); provider.Utility.SaveTestOutputFile(image, "png", options);
@ -44,7 +44,7 @@ namespace SixLabors.ImageSharp.Tests
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
using (Image<TPixel> image = provider.GetImage()) using (Image<TPixel> image = provider.GetImage())
using (MemoryStream ms = new MemoryStream()) using (var ms = new MemoryStream())
{ {
image.Save(ms, new PngEncoder()); image.Save(ms, new PngEncoder());

Loading…
Cancel
Save