New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

terimage

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

terimage

a Node.js tool that allows you to convert and display images directly within your terminal window

latest
Source
npmnpm
Version
1.0.0
Version published
Maintainers
1
Created
Source

Terimage: Print Images in Your Terminal

Terimage is a Node.js tool that allows you to convert and display images directly within your terminal window.

Features

  • Supports various image formats like JPG, PNG, etc. (through Jimp library)
  • Resizes images to fit your terminal dimensions
  • Utilizes colors and characters to represent image details

Installation

  • Make sure you have Node.js and npm (or yarn) installed on your system.
  • Navigate to your project directory in the terminal.
  • Run the following command to install Terimage:
npm install terimage

Usage

Import the Terimage class in your Node.js script:

import Terimage from "terimage";
import fs from "fs";

const terimage = new Terimage();

const image = fs.readFileSync("./PATH_TO_IMAGE");

terimage.image(image).then((result) => {
    console.log(result);
});

Options:

  • width: Accepts a number (pixels) or a string percentage (e.g., "50%").
  • height: Accepts a number (pixels) or a string percentage (e.g., "75%"). If not provided, the height will be automatically scaled based on the width and original image ratio.

Contributing

Feel free to submit a pull request if you have any improvements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Note

This project is still in its early stages, and there are many improvements to be made. Feel free to contribute or provide feedback.

Keywords

terminal

FAQs

Package last updated on 10 Mar 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts