You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

concat-frames

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

concat-frames

Concatenate a pixel-stream into an array of frames

1.0.3
latest
Source
npmnpm
Version published
Weekly downloads
812
13.88%
Maintainers
1
Weekly downloads
 
Created
Source

concat-frames

Concatenates a pixel-stream into an array of frame objects. This is useful for testing purposes, and cases where you want an entire image frame at once, rather than a stream.

Installation

npm install concat-frames

Example

The following example produces an array of frames from an animated GIF using gif-stream.

var concat = require('concat-frames');
var GIFDecoder = require('gif-stream/decoder');

fs.createReadStream('in.gif')
  .pipe(new GIFDecoder)
  .pipe(concat(function(frames) {
    // frames is an array of frame objects.
    // each one has a `pixels` property containing
    // the raw RGB pixel data for that frame, as
    // well as the width, height, etc.
  }));

License

MIT

Keywords

pixel-stream

FAQs

Package last updated on 06 Mar 2015

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