Class AnimationEncoder

Encodes an animation a frame at a time, without keeping all frames in memory: see Animation.webpEncoder, Animation.gifEncoder and Animation.apngEncoder. The file is the one an Animation of the frames encodes to, but for unoptimized WebPs with frames WebP can't store as they are (disposed to the previous frame, or disposed with odd offsets): from the first of them on, the frames are the canvas they show (the same animation, blending rounds differently by 1 at most). APNGs keep their frames compressed until the end: their pixel format depends on all of them

Properties

Accessors

Methods

Properties

height: number
width: number

Accessors

Methods

  • Encodes the rest and returns the file. The encoder can't be used afterwards

    Returns Promise<Uint8Array<ArrayBufferLike>>