If the image buffer is formatted properly,
just open the image file in mode 'wb' and save using write, giving the file a proper image name.
example:
just open the image file in mode 'wb' and save using write, giving the file a proper image name.
example:
with open('imagename.png', 'wb') as fp: fp.write(imagebuffer)use proper suffix for image type as well.