WUT_Computer_Science/utils.py
Jakub Poćwiardowski b74883b796
New parsing (#4)
* works for cornell now, will be extended to import others

* works for all scenes

* can load environments and blur them

* minor cleanup

* Example commands added to README.md
2025-01-18 17:31:27 +00:00

13 lines
395 B
Python

from configparser import ConfigParser
def load_config(config_path):
config = ConfigParser()
config.read(config_path)
return config
def parse_resolution(resolution):
try:
width, height = map(int, resolution.lower().split('x'))
return width, height
except ValueError:
raise ValueError("Resolution must be in the format WIDTHxHEIGHT, e.g., 1920x1080.")