x/cliffy/ansi/mod.ts

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
function image
import { image } from "https://deno.land/x/cliffy@v0.20.1/ansi/mod.ts?s=image";

Create image.

Parameters

buffer: string | ArrayBuffer[src]

Image buffer.

optional
options: ImageOptions
[src]

Image options.

const response = await fetch("https://deno.land/images/hashrock_simple.png");
const imageBuffer: ArrayBuffer = await response.arrayBuffer();
console.log(
ansi.image(imageBuffer),
);