npm.io
1.0.6 • Published 5 years ago

node-image-prompt

Licence
MIT
Version
1.0.6
Deps
3
Size
41 kB
Vulns
0
Weekly
0

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

Keywords