Optional
forceForce format output, otherwise attempt to use input format (optional, default true)
Optional
progressiveUse progressive (interlace) scan (optional, default false)
Optional
compressionzlib compression level, 0-9 (optional, default 6)
Optional
adaptiveUse adaptive row filtering (optional, default false)
Optional
qualityUse the lowest number of colours needed to achieve given quality (optional, default 100
)
Optional
effortLevel of CPU effort to reduce file size, between 1 (fastest) and 10 (slowest), sets palette to true (optional, default 7)
Optional
paletteQuantize to a palette-based image with alpha transparency support (optional, default false)
Optional
coloursMaximum number of palette entries (optional, default 256)
Optional
colorsAlternative Spelling of "colours". Maximum number of palette entries (optional, default 256)
Optional
ditherLevel of Floyd-Steinberg error diffusion (optional, default 1.0)
Image compression options to use when rendering icon images for final output to Touch Portal.
Default
compressionLevel
andquality
are set in plugin settings and can be overridden in an icon's "finalize" action.compressionLevel
of0
disables compression step entirely (sharp
lib is never invoked,skia-canvas
PNG-24 output is used directly). Otherwise these are passed tosharp.png()
for final compression of theskia-canvas
output. Defaulteffort
is set to1
andpalette
totrue
.