override dpi by res if specified, closes #3