Skip to content

denostack/imgcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🦕🥞 imgcat

Print Image to Terminal(iTerm2).

Usage

import { printImage } from "https://deno.land/x/imgcat/mod.ts";

await printImage(await Deno.readFile("./deno512.png"));

And run with deno run -A test.ts.

example1

Alo, You can use it with deno-canvas.

import { printImage } from "https://deno.land/x/imgcat/mod.ts";

import { createCanvas } from "https://deno.land/x/[email protected]/mod.ts";

const canvas = createCanvas(200, 200);
const ctx = canvas.getContext("2d");

ctx.fillStyle = "red";
ctx.fillRect(10, 10, 200 - 20, 200 - 20);

await printImage(canvas.toBuffer());

example2

About

Print Image to Terminal(iTerm2).

Resources

Stars

Watchers

Forks

Packages

No packages published