Ok. Looking at the method Image.GetBounds I see:
Return value:
We need to pass the unit of measurement BY REFERENCE. I had no idea why.
It turns out this method ALWAYS RETURNS THE VALUE IN PIXELS. Additionally the unit parameter is always set to Pixel instead.
And there is no ANY information about it on the documentation at all. Great. I wasted 2 hours for this.
Again have to patch, fix, extend.
Return value:
The RectangleF that represents the bounds of the image, in the specified unit.So far so good. But please notice the signature of the method:
public RectangleF GetBounds(ref GraphicsUnit pageUnit)
We need to pass the unit of measurement BY REFERENCE. I had no idea why.
It turns out this method ALWAYS RETURNS THE VALUE IN PIXELS. Additionally the unit parameter is always set to Pixel instead.
And there is no ANY information about it on the documentation at all. Great. I wasted 2 hours for this.
Again have to patch, fix, extend.