Browse Source

Added missing this.

af/merge-core
dirk 10 years ago
parent
commit
db154c2ed9
  1. 6
      src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs
  2. 2
      src/ImageSharp/Image/ImageProperty.cs
  3. 12
      src/ImageSharp/Samplers/Processors/RotateProcessor.cs

6
src/ImageSharp/Formats/Jpg/JpegEncoderCore.cs

@ -488,9 +488,9 @@ namespace ImageSharp.Formats
int componentCount = 3; int componentCount = 3;
// Write the Start Of Image marker. // Write the Start Of Image marker.
WriteApplicationHeader((short)image.HorizontalResolution, (short)image.VerticalResolution); this.WriteApplicationHeader((short)image.HorizontalResolution, (short)image.VerticalResolution);
WriteProfiles(image); this.WriteProfiles(image);
// Write the quantization tables. // Write the quantization tables.
this.WriteDQT(); this.WriteDQT();
@ -574,7 +574,7 @@ namespace ImageSharp.Formats
where TColor : struct, IPackedPixel<TPacked> where TColor : struct, IPackedPixel<TPacked>
where TPacked : struct where TPacked : struct
{ {
WriteProfile(image.ExifProfile); this.WriteProfile(image.ExifProfile);
} }
private void WriteProfile(ExifProfile exifProfile) private void WriteProfile(ExifProfile exifProfile)

2
src/ImageSharp/Image/ImageProperty.cs

@ -94,7 +94,7 @@ namespace ImageSharp
{ {
ImageProperty other = obj as ImageProperty; ImageProperty other = obj as ImageProperty;
return Equals(other); return this.Equals(other);
} }
/// <summary> /// <summary>

12
src/ImageSharp/Samplers/Processors/RotateProcessor.cs

@ -39,7 +39,7 @@ namespace ImageSharp.Processors
{ {
const float Epsilon = .0001F; const float Epsilon = .0001F;
if (Math.Abs(Angle) < Epsilon || Math.Abs(Angle - 90) < Epsilon || Math.Abs(Angle - 180) < Epsilon || Math.Abs(Angle - 270) < Epsilon) if (Math.Abs(this.Angle) < Epsilon || Math.Abs(this.Angle - 90) < Epsilon || Math.Abs(this.Angle - 180) < Epsilon || Math.Abs(this.Angle - 270) < Epsilon)
{ {
return; return;
} }
@ -54,7 +54,7 @@ namespace ImageSharp.Processors
/// <inheritdoc/> /// <inheritdoc/>
public override void Apply(ImageBase<TColor, TPacked> target, ImageBase<TColor, TPacked> source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY) public override void Apply(ImageBase<TColor, TPacked> target, ImageBase<TColor, TPacked> source, Rectangle targetRectangle, Rectangle sourceRectangle, int startY, int endY)
{ {
if (OptimizedApply(target, source)) if (this.OptimizedApply(target, source))
{ {
return; return;
} }
@ -93,25 +93,25 @@ namespace ImageSharp.Processors
private bool OptimizedApply(ImageBase<TColor, TPacked> target, ImageBase<TColor, TPacked> source) private bool OptimizedApply(ImageBase<TColor, TPacked> target, ImageBase<TColor, TPacked> source)
{ {
const float Epsilon = .0001F; const float Epsilon = .0001F;
if (Math.Abs(Angle) < Epsilon) if (Math.Abs(this.Angle) < Epsilon)
{ {
target.ClonePixels(target.Width, target.Height, source.Pixels); target.ClonePixels(target.Width, target.Height, source.Pixels);
return true; return true;
} }
if (Math.Abs(Angle - 90) < Epsilon) if (Math.Abs(this.Angle - 90) < Epsilon)
{ {
this.Rotate90(target, source); this.Rotate90(target, source);
return true; return true;
} }
if (Math.Abs(Angle - 180) < Epsilon) if (Math.Abs(this.Angle - 180) < Epsilon)
{ {
this.Rotate180(target, source); this.Rotate180(target, source);
return true; return true;
} }
if (Math.Abs(Angle - 270) < Epsilon) if (Math.Abs(this.Angle - 270) < Epsilon)
{ {
this.Rotate270(target, source); this.Rotate270(target, source);
return true; return true;

Loading…
Cancel
Save