Initial commit.
This commit is contained in:
commit
b48a4e92e1
169 changed files with 7538 additions and 0 deletions
10
lib/resize.js
Normal file
10
lib/resize.js
Normal file
|
@ -0,0 +1,10 @@
|
|||
import debugname from 'debug';
|
||||
const debug = debugname('hostr-api:resize');
|
||||
import gm from 'gm';
|
||||
|
||||
export default function(input, size) {
|
||||
debug('Resizing');
|
||||
const image = gm(input);
|
||||
|
||||
return image.resize(size.width, size.height, '>').stream();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue