Class CraiyonImage

Api

public

Classdesc

Represents a single image from a Craiyon image generation output.

Hierarchy

  • CraiyonImage

Constructors

Methods

  • Will return the base64 representation of the image.

    Returns

    The base64-encoded string.

    Returns string

  • Will create a buffer from the base64 representation of the image.

    Returns

    The buffer containing the image data.

    Returns Buffer

  • Will write the image to the given path asynchronously.

    Parameters

    • path: string

      The path to write the image to.

    Returns Promise<void>

  • Will write the image to the given path synchronously.

    Parameters

    • path: string

      The path to write the image to.

    Returns void

  • Will create a read stream from the image.

    Returns

    The readable stream.

    Returns ReadStream

Generated using TypeDoc