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

@minecraftts/buffered-image

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@minecraftts/buffered-image

A simple wrapper around node-canvas

latest
Source
npmnpm
Version
1.1.0
Version published
Maintainers
1
Created
Source

buffered-image

Not to be confused with Java BufferedImages, I just couldn't think of a better name (lawl). This is just a thin wrapper on top of node-canvas

Usage

import { BufferedImage } from "@minecraftts/buffered-image"

const bufferedImage = new BufferedImage(200, 200);
const graphics = bufferedImage.getGraphics();

graphics.fillStyle = "red";
graphics.fillRect(50, 50, 100, 100);

// before querying pixels you have to do this
bufferedImage.refresh();

let pixel = bufferedImage.getPixel(0, 0);
console.log(pixel); // => { r: 0, g: 0, b: 0, a: 0 }
pixel = bufferedImage.getPixel(100, 100);
console.log(pixel); // => { r: 255, g: 0, b: 0, a: 255 }

Installation

Run

npm install @minecraftts/buffered-image

License

Everything here is licensed under the MIT license

Keywords

wrapper

FAQs

Package last updated on 08 Nov 2022

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