Fully implemented function I found to get DPI. It currently returns infinity.