Fixed handling of images with DPIs other than 96.

Fixed handling of non-96dpi images by parsing out the DPI from
the image and applying the appropritate scaling.

Issue #164.