fromPILimportImage,ImageFilterimportosimag=Image.open('xyz.jpeg')imag.show()# open image in image viewerimag.save('xyz.png')# save file with other extensionforfinos.listdir('.'):# current directoryiff.endswith('.jpeg'):i=Image.open(f)fn,fext=os.path.splittext(f)# extract filename and file extensioni.save(f'other_dir/{fn}.png')# save each file with other file extension and same namesize_300=(300,300)# tupleimg.thumbnail(size_300).save(f'other_dir/{fn}.{fext}')# changing the resolutionimg.rotate(90).save('image_modified.jpeg')# rotate clockwiseimg.convert(mode='L').save('image_modified.jpeg')# black and whiteimg.filter(ImageFilter.GaussianBlur(10)).save('image_modified.jpeg')# Blur Image, 10 is level of Blur