Browse Source

Reduce magic number count by one.

Former-commit-id: cbd1a16d7ba048e92ee4fbe5e739764d639c0ab3
Former-commit-id: 2b2af7344ebb2bc922ced7934bea6afd304ffb70
Former-commit-id: f635c6194e2d40387bf962a4e0973128bf06575a
af/merge-core
James Jackson-South 10 years ago
parent
commit
c43ed407b2
  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