refactored dpi to ppi and handled the auto size case