def convert(src, dest):
    if '.dds' in src.lower():
        # Compressed textures need to be uploaded to the video card before
        # they can be saved.
        texture = pyglet.image.load(src).get_texture()
        texture.save(dest)
    else:
        # Otherwise just save the loaded image in the new format.
        image = pyglet.image.load(src)
        image.save(dest)
dataset/ETHPy150Open ardekantur/pyglet/examples/image_convert.py/convert/original