smarter parsing of resolution from commandline