Automatic resolution detection