code: def file_to_png(fp):
  	
  	import PIL.Image # pylint: disable=import-error
  	with io.BytesIO() as dest:
  		PIL.Image.open(fp).save(dest, "PNG", optimize=True)
  		return dest.getvalue()
docs: Convert an image to PNG format with Pillow.
  	
  	:arg file-like fp: The image file.
  	:rtype: bytes