for i in range(1, len(files)):
    currentimage = Image.open('./' + files[i])
finalimage = ImageChops.lighter(finalimage, currentimage)
finalimage.save('allblended.jpg', 'JPEG')
Stacking astronomy images with Python