diff --git a/src/ImageSharp/Bootstrapper.cs b/src/ImageSharp/Bootstrapper.cs index efaf8fe99..35a4a5225 100644 --- a/src/ImageSharp/Bootstrapper.cs +++ b/src/ImageSharp/Bootstrapper.cs @@ -52,7 +52,6 @@ namespace ImageSharp /// public IReadOnlyCollection ImageFormats => new ReadOnlyCollection(this.imageFormats); - /// /// Gets or sets the global parallel options for processing tasks in parallel. /// diff --git a/src/ImageSharp/Colors/Color.cs b/src/ImageSharp/Colors/Color.cs index 656f9fac9..da0efc152 100644 --- a/src/ImageSharp/Colors/Color.cs +++ b/src/ImageSharp/Colors/Color.cs @@ -1,5 +1,4 @@ - -// +// // Copyright (c) James Jackson-South and contributors. // Licensed under the Apache License, Version 2.0. // diff --git a/src/ImageSharp/Colors/ColorDefinitions.cs b/src/ImageSharp/Colors/ColorDefinitions.cs index 2c2a16965..46e0f8709 100644 --- a/src/ImageSharp/Colors/ColorDefinitions.cs +++ b/src/ImageSharp/Colors/ColorDefinitions.cs @@ -585,7 +585,6 @@ namespace ImageSharp /// public static readonly Color RebeccaPurple = new Color(102, 51, 153, 255); - /// /// Represents a matching the W3C definition that has an hex value of #FF0000. /// diff --git a/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs b/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs index 35afdd68f..aba253fe5 100644 --- a/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs +++ b/src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs @@ -159,7 +159,10 @@ namespace ImageSharp.Formats foreach (var v in s.Values) { - if (v > maxValue) maxValue = v; + if (v > maxValue) + { + maxValue = v; + } } this.Values = new uint[maxValue + 1]; @@ -240,7 +243,11 @@ namespace ImageSharp.Formats { byte b = (byte)(bits >> 24); this.WriteByte(b); - if (b == 0xff) this.WriteByte(0x00); + if (b == 0xff) + { + this.WriteByte(0x00); + } + bits <<= 8; nBits -= 8; } @@ -293,7 +300,6 @@ namespace ImageSharp.Formats } } - /// /// Writes a block of pixel data using the given quantization table, /// returning the post-quantized DC value of the DCT-transformed block. @@ -336,7 +342,11 @@ namespace ImageSharp.Formats } } - if (runLength > 0) this.EmitHuff(h, 0x00); + if (runLength > 0) + { + this.EmitHuff(h, 0x00); + } + return dc; } @@ -457,8 +467,15 @@ namespace ImageSharp.Formats this.quant[i] = new byte[Block.BlockSize]; } - if (quality < 1) quality = 1; - if (quality > 100) quality = 100; + if (quality < 1) + { + quality = 1; + } + + if (quality > 100) + { + quality = 100; + } // Convert from a quality rating to a scaling factor. int scale; @@ -478,8 +495,16 @@ namespace ImageSharp.Formats { int x = this.unscaledQuant[i, j]; x = ((x * scale) + 50) / 100; - if (x < 1) x = 1; - if (x > 255) x = 255; + if (x < 1) + { + x = 1; + } + + if (x > 255) + { + x = 255; + } + this.quant[i][j] = (byte)x; } } @@ -731,8 +756,6 @@ namespace ImageSharp.Formats this.Emit(0x7f, 7); } - - /// /// Encodes the image with no subsampling. /// @@ -772,8 +795,15 @@ namespace ImageSharp.Formats Block[] cr = new Block[4]; int prevDCY = 0, prevDCCb = 0, prevDCCr = 0; - for (int i = 0; i < 4; i++) cb[i] = new Block(); - for (int i = 0; i < 4; i++) cr[i] = new Block(); + for (int i = 0; i < 4; i++) + { + cb[i] = new Block(); + } + + for (int i = 0; i < 4; i++) + { + cr[i] = new Block(); + } for (int y = 0; y < pixels.Height; y += 16) { diff --git a/src/ImageSharp/Image/ImageBase.cs b/src/ImageSharp/Image/ImageBase.cs index 24648a06c..0a0b5f4b4 100644 --- a/src/ImageSharp/Image/ImageBase.cs +++ b/src/ImageSharp/Image/ImageBase.cs @@ -3,7 +3,6 @@ // Licensed under the Apache License, Version 2.0. // - namespace ImageSharp { using System; diff --git a/src/ImageSharp/Profiles/Exif/ExifProfile.cs b/src/ImageSharp/Profiles/Exif/ExifProfile.cs index 53e876615..7694ef7c6 100644 --- a/src/ImageSharp/Profiles/Exif/ExifProfile.cs +++ b/src/ImageSharp/Profiles/Exif/ExifProfile.cs @@ -148,7 +148,9 @@ namespace ImageSharp foreach (ExifValue exifValue in this.Values) { if (exifValue.Tag == tag) + { return exifValue; + } } return null; diff --git a/src/ImageSharp/Profiles/Exif/ExifTag.cs b/src/ImageSharp/Profiles/Exif/ExifTag.cs index 990d526eb..b4c391f0b 100644 --- a/src/ImageSharp/Profiles/Exif/ExifTag.cs +++ b/src/ImageSharp/Profiles/Exif/ExifTag.cs @@ -27,7 +27,6 @@ namespace ImageSharp /// GPSIFDOffset = 0x8825, - /// /// ImageWidth /// @@ -276,7 +275,6 @@ namespace ImageSharp /// Copyright = 0x8298, - /// /// DocumentName /// @@ -608,7 +606,6 @@ namespace ImageSharp /// ImageLayer = 0x87AC, - /// /// ExposureTime /// @@ -1002,7 +999,6 @@ namespace ImageSharp /// ImageUniqueID = 0xA420, - /// /// GPSVersionID /// diff --git a/src/ImageSharp/Profiles/Exif/ExifTagDescriptionAttribute.cs b/src/ImageSharp/Profiles/Exif/ExifTagDescriptionAttribute.cs index 90e956243..0709a18c7 100644 --- a/src/ImageSharp/Profiles/Exif/ExifTagDescriptionAttribute.cs +++ b/src/ImageSharp/Profiles/Exif/ExifTagDescriptionAttribute.cs @@ -32,14 +32,18 @@ namespace ImageSharp { FieldInfo field = tag.GetType().GetTypeInfo().GetDeclaredField(tag.ToString()); if (field == null) - return null; + { + return null; + } foreach (CustomAttributeData customAttribute in field.CustomAttributes) { object attributeValue = customAttribute.ConstructorArguments[0].Value; if (Equals(attributeValue, value)) + { return (string)customAttribute.ConstructorArguments[1].Value; + } } return null;