pngRemoveTransparency

emlib.img.pngRemoveTransparency(pngfile, outfile='', background=(255, 255, 255))[source]

Remove transparency from a png file

If outfile is not given, the operation is performed in place

Parameters:
  • pngfile (str) – the source file

  • outfile – if given, the result is saved to this file

  • background – the color to use as replacement for the background

Return type:

None