Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

images

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

images

Cross-platform image decoder(png/jpeg/gif) and encoder(png) for Nodejs

  • 1.0.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8.8K
increased by4.56%
Maintainers
1
Weekly downloads
 
Created
Source

node-images

Cross-platform image decoder(png/jpeg/gif) and encoder(png) for Nodejs

Installation

$ npm install images

Usage

var images = require('images'); //npm
// var images = require('./index.js'); //git

var img = new images.Image();
img.loadFromBuffer(fs.readFileSync("test/img/rotating_earth.gif"));
fs.writeFileSync("test/output/gif2png.png", img.toBuffer(images.TYPE_PNG));

Api

images.Image([width, heigth])

loadFromBuffer(buffer[, start, [end]]);

See test/loadFromBuffer.js

copyFromImage(x, y, width, height);

See test/copyFromImage.js

fillColor(red, green, blue[, alpha]);

See test/fillColor.js

drawImage(img, x, y);

See test/drawImage.js

toBuffer(type);

See test/toBuffer.js

width

readonly

height

readonly

Keywords

FAQs

Package last updated on 25 Feb 2013

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc