| 81 | } |
| 82 | |
| 83 | std::pair<int, int> tryParseResolution(const std::string &s) { |
| 84 | std::istringstream iss(s); |
| 85 | |
| 86 | int width, height; |
| 87 | char comma; |
| 88 | if (iss >> width >> comma >> height && comma == ',') { |
| 89 | return std::make_pair(width, height); |
| 90 | } else { |
| 91 | std::cerr << "Failed to parse resolution from " << s << std::endl; |
| 92 | exit(EXIT_FAILURE); |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | int main(int argc, char *argv[]) { |
| 97 | std::vector<std::string> arguments(argv, argv + argc); |