Spaces:
Sleeping
Sleeping
File size: 391 Bytes
3fded0a 79f7ac0 3fded0a 79f7ac0 3fded0a |
1 2 3 4 5 6 7 8 9 10 11 12 |
export function parseResolution(resolutionString?: string) {
if (!resolutionString) return { width: undefined, height: undefined };
const parts = resolutionString.split('x');
if (parts.length === 2) {
const width = parseInt(parts[0], 10);
const height = parseInt(parts[1], 10);
return { width, height };
} else {
return { width: undefined, height: undefined };
}
}
|