Pixel Data JS - v0.28.0
    Preparing search index...

    Function imageDataToDataUrl

    • Converts an ImageData object into a base64-encoded Data URL string.

      Parameters

      • imageData: ImageData

        The pixel data to be converted.

      Returns string

      A string representing the image in image/png format as a Data URL.

      If the HTMLCanvasElement context cannot be initialized.

      const dataUrl = imageDataToDataUrl(imageData);
      const img = new Image();
      img.src = dataUrl;
    Index

    Properties

    Properties

    reset: () => void