Added density value for conversion

Hi, I have added support for converting density (dpi) images. Do you accept?