Code to determine dpi
Calculated DPI