node-image-prompt

Library made to show up a prompt to display an image

Usage no npm install needed!

<script type="module">
  import nodeImagePrompt from 'https://cdn.skypack.dev/node-image-prompt';
</script>

README

image prompt

Display an image prompt from node js

Example:

const { displayImage } = require("../dist")
const { readFileSync } = require("fs")

displayImage(readFileSync("./img_lights.jpg"), "aurealis borealis").then(() => console.log("closed prompt"))

Display an image

Doc:

Display an prompt showing an image:

function displayImage(imageBuf: Buffer, title?: string): Promise<void>

imageBuf — The buffer of the image

title — The title of the window.

Return an promise that will be suceeded when the image prompt will be closed