added conversion cm to Pixel in dimensionRatio function