- if global_db: global_db.close()
-
-
- if ext.lower() in (".bmp", ".png"):
- # xsetbg does not recognize BMP files.
- # PNG files have gamma settings, and xli can adapt it to the display gamma;
- # xloadimage/xview/xsetbg display them with wrong gamma.
- program_options = ["xli", "xli", "-onroot", "-quiet"] + placement_options + \
- ["-center", "-border", border, image_name]
- os.execlp(*program_options)
- error("cannot execute xli!")
- else:
- # ...but xli failed to load many image types, use xsetbg for them
- program_options = ["xsetbg", "xsetbg"] + placement_options + \
- ["-center", "-border", border, image_name]
- os.execlp(*program_options)
- error("cannot execute xsetbg!")
-
-
-if __name__ == "__main__":
- run()