PNG resolution rouned up to next int

The attached image has a resolution of 150.0124 dpi in both horizontal and vertical. That sounds odd, but PNG spec only allows for resolution to be measured in meters.
http://www.libpng.org/pub/png/spec/1.2/PNG-Chunks.html#C.pHYs

The resolution is set to: 5906 (pixels per meter)
5906 * .0254 (meters per inch) = 150.0124 (dpi)

Aspose reports the resolution as 151.

val path = Paths.get(“Sildar_Hallwinter_150.png”)
val img = Image.load(path.toString).asInstanceOf[RasterImage]
info(s"resolution: { h:${img.getHorizontalResolution} v:${img.getVerticalResolution} }")
img.close()

(note: code is scala)

Not only is the resolution pretty aggressively rounded up, but getHorizontalResolution and getVerticalResolution are doubles, so the rounding choice could have been left to the client app.

If a choice must be made, it seems better to round up at .5, as is usually done in everyday math.

Thanks.

Hi Anthony,

Thank you for your inquiry and providing sample file.

We have tried to reproduce the issue at our end. It was found that the issue persists. The issue has been logged into our issue tracking system with ID IMAGING-35367. Our product team will further look into it. We will update you accordingly via this forum thread.

The issues you have found earlier (filed as IMAGING-35367) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.