import json


def get_rig_width(parent, rig_fn):
    """Finds the camera image width.

    Args:
        parent: class instance
        rig_fn (str): Path to the rig

    Returns:
        int: Camera image width.
    """
    with open(rig_fn, "r") as f:
        rig = json.load(f)
        return int(rig["cameras"][0]["resolution"][0])