OptionalcompressionThe zlib compression level (0-9), higher is smaller but slower. Default: 1
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. Default: true
Options of Animation.encodeAPNG