<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def main(input_file, output, format):
 """Converts an image file to a Leaflet map."""


    try:
        process_image(input_file, subfolder=output, ext=format)
    except Exception as e:
        sys.exit(e)