Browse Source

Reduce magic number count by one.

Former-commit-id: 5bc6d7989fe36fd17065c07d32e5029254d8f6d3
Former-commit-id: 2068ad7c76acc7f35d9900c12a1a70af9e8ebbc6
Former-commit-id: 74270b2d0480938b471b86f413df343fa91922bd
pull/17/head
James Jackson-South 10 years ago
parent
commit
6fee765781
  1. 1
      src/ImageProcessor/Formats/Png/PngDecoderCore.cs
  2. 1
      tests/ImageProcessor.Tests/TestImages/Formats/Png/mountain.png.REMOVED.git-id

1
src/ImageProcessor/Formats/Png/PngDecoderCore.cs

@ -201,6 +201,7 @@ namespace ImageProcessor.Formats
Array.Reverse(data, 0, 4);
Array.Reverse(data, 4, 4);
// 39.3700787 = inches in a meter.
this.currentImage.HorizontalResolution = BitConverter.ToInt32(data, 0) / 39.3700787d;
this.currentImage.VerticalResolution = BitConverter.ToInt32(data, 4) / 39.3700787d;
}

1
tests/ImageProcessor.Tests/TestImages/Formats/Png/mountain.png.REMOVED.git-id

@ -0,0 +1 @@
e51bffc5ceb300a70039c9c3ce4542eff47925ea
Loading…
Cancel
Save