Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/ansi/mod.ts>image

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";

Create image.

Parameters

buffer: string | ArrayBuffer

Image buffer.

optional
options: ImageOptions

Image options.

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

Returns

string