OptionalbackgroundOptionalcompressionSpecifies the ZLIB compression level. Defaults to 6.
OptionalfiltersAny bitwise combination of PNG_FILTER_NONE, PNG_FILTER_SUB,
PNG_FILTER_UP, PNG_FILTER_AVG and PNG_FILTER_PATETH; or one of
PNG_ALL_FILTERS or PNG_NO_FILTERS (all are properties of the canvas
instance). These specify which filters may be used by libpng. During
encoding, libpng will select the best filter from this list of allowed
filters. Defaults to canvas.PNG_ALL_FILTERS.
OptionalpaletteFor creating indexed PNGs. The palette of colors. Entries should be in RGBA order.
Optionalresolutionpixels per inch
For creating indexed PNGs. The index of the background color. Defaults to 0.