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

gifencoder

Package Overview
Dependencies
Maintainers
4
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gifencoder - npm Package Compare versions

Comparing version 1.1.0 to 2.0.0

.travis.yml

4

lib/GIFEncoder.js

@@ -20,3 +20,3 @@ /*

ByteArray.prototype.getData = function() {
return new Buffer(this.data);
return new Buffer.from(this.data);
};

@@ -117,3 +117,3 @@

this.readStreams.forEach(function (rs) {
rs.push(new Buffer(self.out.data));
rs.push(Buffer.from(self.out.data));
});

@@ -120,0 +120,0 @@ this.out.data = [];

{
"name": "gifencoder",
"version": "1.1.0",
"version": "2.0.0",
"description": "Streaming server-side animated (and non-animated) gif generation for node.js",

@@ -32,13 +32,14 @@ "main": "index.js",

},
"dependencies": {},
"dependencies": {
"canvas": "^2.2.0"
},
"devDependencies": {
"after": "~0.8.1",
"canvas": "^1.6.4",
"concat-stream": "^1.4.6",
"expect.js": "^0.3.1",
"mocha": "^3.4.2",
"mocha": "^5.2.0",
"png-file-stream": "^1.0.0",
"png-js": "~0.1.1",
"range": "0.0.2"
"range": "0.0.3"
}
}

@@ -5,10 +5,4 @@ # gifencoder

This code is based on the fine work of the following developers, but adds
server-side generation with [node-canvas](https://github.com/learnboost/node-canvas)
and support for node.js Buffers:
[![build status](https://secure.travis-ci.org/eugeneware/gifencoder.png)](http://travis-ci.org/eugeneware/gifencoder)
* Kevin Weiner (original Java version - kweiner@fmsware.com)
* Thibault Imbert (AS3 version - bytearray.org)
* Johan Nordberg ([gif.js](http://jnordberg.github.io/gif.js/) - code@johan-nordberg.com)
## Installation

@@ -32,5 +26,15 @@

pngFileStream('test/**/frame?.png')
var stream = pngFileStream('test/**/frame?.png')
.pipe(encoder.createWriteStream({ repeat: -1, delay: 500, quality: 10 }))
.pipe(fs.createWriteStream('myanimated.gif'));
stream.on('finish', function () {
// Process generated GIF
});
// Alternately, you can wrap the "finish" event in a Promise
await new Promise((resolve, reject) => {
stream.on('finish', resolve);
stream.on('error', reject);
});
```

@@ -83,1 +87,22 @@

![Animated GIF](https://raw.github.com/eugeneware/gifencoder/master/examples/myanimated.gif)
## Contributing
gifencoder is an **OPEN Open Source Project**. This means that:
> Individuals making significant and valuable contributions are given commit-access to the project to contribute as they see fit. This project is more like an open wiki than a standard guarded open source project.
See the [CONTRIBUTING.md](https://github.com/eugeneware/gifencoder/blob/master/CONTRIBUTING.md) file for more details.
### Contributors
gifencoder is only possible due to the excellent work of the following contributors:
<table><tbody>
<tr><th align="left">Kevin Weiner</th><td><a href="mailto:kweiner@fmsware.com">kweiner@fmsware.com</a></td></tr>
<tr><th align="left">Thibault Imbert</th><td><a href="http://www.bytearray.org/">http://www.bytearray.org/</a></td></tr>
<tr><th align="left">Eugene Ware</th><td><a href="https://github.com/eugeneware">GitHub/eugeneware</a></td></tr>
<tr><th align="left">Raine Virta</th><td><a href="https://github.com/raine">GitHub/raine</a></td></tr>
<tr><th align="left">Paul Ochoa</th><td><a href="https://github.com/rochoa">GitHub/rochoa</a></td></tr>
<tr><th align="left">Heikki Pora</th><td><a href="https://github.com/heikkipora">GitHub/heikkipora</a></td></tr>
</tbody></table>

@@ -1,12 +0,13 @@

var expect = require('expect.js'),
fs = require('fs'),
path = require('path'),
Canvas = require('canvas'),
concat = require('concat-stream'),
stream = require('stream'),
png = require('png-js'),
after = require('after'),
range = require('range'),
pngFileStream = require('png-file-stream'),
GIFEncoder = require('..');
const expect = require('expect.js');
const fs = require('fs');
const path = require('path');
const Canvas = require('canvas');
const concat = require('concat-stream');
const stream = require('stream');
const png = require('png-js');
const after = require('after');
const { range } = require('range');
const pngFileStream = require('png-file-stream');
const GIFEncoder = require('..');
const { createCanvas, Image } = require('canvas')

@@ -28,6 +29,6 @@ function getData(ctx, width, height) {

var buf = fs.readFileSync(fixtures('in.png'));
var img = new Canvas.Image();
var img = new Image();
img.src = buf;
var canvas = new Canvas(img.width, img.height);
var canvas = createCanvas(img.width, img.height);
var ctx = canvas.getContext('2d');

@@ -63,6 +64,6 @@

var buf = fs.readFileSync(fixtures('in.png'));
var img = new Canvas.Image();
var img = new Image();
img.src = buf;
var canvas = new Canvas(img.width, img.height);
var canvas = createCanvas(img.width, img.height);
var ctx = canvas.getContext('2d');

@@ -108,6 +109,6 @@

var buf = fs.readFileSync(fixtures('in.png'));
var img = new Canvas.Image();
var img = new Image();
img.src = buf;
var canvas = new Canvas(img.width, img.height);
var canvas = createCanvas(img.width, img.height);
var ctx = canvas.getContext('2d');

@@ -114,0 +115,0 @@

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