Fix the blurry effect by shifting the canvas for 0.5 pixel.
calculate the exakt height of the canvas