OptionalalphaFor lossy compression, the transparency (alpha) channel's quality (0-100). Lower values may make the image smaller but can make transparency look less smooth
OptionaleffortCompression effort (0-6): higher values usually take longer but may make smaller files. For lossless images,
0 prioritizes speed; 2 and above spend more time reducing file size (lossless images are encoded the same at
2 and above)
OptionalmetadataMetadata to include, see Metadata
OptionaloptimizeWhether to store each frame as the area that changed since the frame before and merge identical frames, which
usually makes files a lot smaller. The file shows the same animation either way, but only decodes to the same
frames without it, which also encodes faster when little changes. The exception is GIF, which has no partial
transparency: without optimize, a semi-transparent pixel becomes opaque or transparent in its own frame, with
it the frames are composited first
OptionalqualityLossy compression (0-100): higher values usually preserve more detail but make larger files. 100, like no
quality, encodes losslessly and keeps every pixel exact (99 is the highest lossy quality)
OptionalsharpFor lossy compression: improve color detail around sharp edges (for example, red text on a blue background). This can take longer and make graphics larger
Options of Animation.encodeWebP and Animation.webpEncoder: those of WebPEncodeOptions for every frame (but
threads: the frames are encoded one at a time), and the animation options. Withoutqualitythe frames are lossless