Function decode

  • Decodes any supported image, GIFs are returned as GIF

    Parameters

    • data: BinaryData

      The image data

    • onlyExtractFirstFrame: boolean = false

      Whether to end GIF decoding after the first frame

    Returns Promise<Image | GIF>