Skip to content

Commit 154b252

Browse files
committed
update readme and example to new api
1 parent f88c9a8 commit 154b252

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ Dialogue: 0,0:00:02.50,0:00:03.97,Default,,0,0,0,,{\fnLiberation Sans\fs40}Okay,
137137
Dialogue: 0,0:00:05.00,0:00:06.90,Default,,0,0,0,,{\fnLiberation Sans\fs40}Okay. Okay.
138138
```
139139

140+
Result extracting a GIF from [22 Jump Street](http://www.imdb.com/title/tt2294449/):
141+
140142
![22](22.gif)
141143

142144
## GIF Performance

example/index.js

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,14 @@ var output = path.join(__dirname, 'movie.gif');
88
var gif = fs.createWriteStream(output);
99

1010
var options = {
11-
resize: '200:-1',
11+
resize: '500:-1',
1212
from: 30,
1313
to: 35,
1414
subtitles: path.join(__dirname, 'movie.ass')
1515
};
1616

17-
gifify(input, options, function done(err, gifReadStream) {
18-
if (err) {
19-
console.error(err);
20-
return;
21-
}
17+
gifify(input, options).pipe(gif);
2218

23-
gifReadStream.pipe(gif);
24-
25-
gif.on('close', function end() {
26-
console.log('gifified ' + input + ' to ' + output);
27-
});
19+
gif.on('close', function end() {
20+
console.log('gifified ' + input + ' to ' + output);
2821
});

0 commit comments

Comments
 (0)