added check for min_desity (dpi)