I have converted a gif in python but the transparency of the background is lost. I want to regain the transparency or find a code to remove the transpparency of the gif
import imageio
clip = os.path.abspath(".\Desktop\\Comp 1.mov")
def gifMaker(inputPath,targetFormat):
outputPath = os.path.splitext(inputPath)[0]+targetFormat
print(f'convertinig {inputPath} \n to {outputPath}')
reader = imageio.get_reader(inputPath)
fps = reader.get_meta_data()['fps']
writer = imageio.get_writer(outputPath,fps=fps)
for frames in reader:
writer.append_data(frames)
print(f'Frame{frames}')
print('done!')
writer.close()
gifMaker(clip,'.gif')```