diff --git a/src/ImageProcessor/Formats/Png/PngDecoderCore.cs b/src/ImageProcessor/Formats/Png/PngDecoderCore.cs index 2ae91f258..85ed12c12 100644 --- a/src/ImageProcessor/Formats/Png/PngDecoderCore.cs +++ b/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; } diff --git a/tests/ImageProcessor.Tests/TestImages/Formats/Png/mountain.png.REMOVED.git-id b/tests/ImageProcessor.Tests/TestImages/Formats/Png/mountain.png.REMOVED.git-id new file mode 100644 index 000000000..e10578b3c --- /dev/null +++ b/tests/ImageProcessor.Tests/TestImages/Formats/Png/mountain.png.REMOVED.git-id @@ -0,0 +1 @@ +e51bffc5ceb300a70039c9c3ce4542eff47925ea \ No newline at end of file