From f32e68ac8279f8854aa8c27eef285db7f83dea0d Mon Sep 17 00:00:00 2001 From: popow Date: Wed, 27 Jun 2018 20:55:29 +0200 Subject: [PATCH] - fixed error message in WriteExifProfile, when Exif data exceeds the limits - fixed some typo's --- src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs | 8 ++++---- src/ImageSharp/Formats/Png/PngDecoderCore.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs index bd5a9e10f0..4560af05af 100644 --- a/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs +++ b/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs @@ -430,7 +430,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg /// The resolution of the image in the y- direction. private void WriteApplicationHeader(short horizontalResolution, short verticalResolution) { - // Write the start of image marker. Markers are always prefixed with with 0xff. + // Write the start of image marker. Markers are always prefixed with 0xff. this.buffer[0] = JpegConstants.Markers.XFF; this.buffer[1] = JpegConstants.Markers.SOI; @@ -617,7 +617,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg if (data.Length > Max) { - throw new ImageFormatException($"Exif profile size exceeds limit. nameof{Max}"); + throw new ImageFormatException($"Exif profile size exceeds limit of {Max} bytes."); } int length = data.Length + 2; @@ -640,7 +640,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg /// private void WriteIccProfile(IccProfile iccProfile) { - // Just incase someone set the value to null by accident. + // Just in-case someone set the value to null by accident. if (iccProfile == null) { return; @@ -896,7 +896,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg /// The marker length. private void WriteMarkerHeader(byte marker, int length) { - // Markers are always prefixed with with 0xff. + // Markers are always prefixed with 0xff. this.buffer[0] = JpegConstants.Markers.XFF; this.buffer[1] = marker; this.buffer[2] = (byte)(length >> 8); diff --git a/src/ImageSharp/Formats/Png/PngDecoderCore.cs b/src/ImageSharp/Formats/Png/PngDecoderCore.cs index e590d6499c..e319dc1610 100644 --- a/src/ImageSharp/Formats/Png/PngDecoderCore.cs +++ b/src/ImageSharp/Formats/Png/PngDecoderCore.cs @@ -1162,7 +1162,7 @@ namespace SixLabors.ImageSharp.Formats.Png /// /// Decodes and assigns marker colors that identify transparent pixels in non indexed images /// - /// The aplha tRNS array + /// The alpha tRNS array private void AssignTransparentMarkers(ReadOnlySpan alpha) { if (this.pngColorType == PngColorType.Rgb) @@ -1209,7 +1209,7 @@ namespace SixLabors.ImageSharp.Formats.Png /// /// The type of pixel we are expanding to /// The defiltered scanline - /// Thecurrent output image row + /// The current output image row private void ProcessScanlineFromPalette(ReadOnlySpan scanline, Span row) where TPixel : struct, IPixel {