added px-density factor calculation