diff options
Diffstat (limited to 'lib/worker/processFiles.js')
| -rw-r--r-- | lib/worker/processFiles.js | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/worker/processFiles.js b/lib/worker/processFiles.js index 21021b5..bde15ef 100644 --- a/lib/worker/processFiles.js +++ b/lib/worker/processFiles.js @@ -110,7 +110,18 @@ function convertToMp3(fullPath) { }) }) } - +function thumbnailJpeg(fullPath, _w, _h) { + const w = _w || 250 + const h = _h || 250 + return new Promise ( (resolve, reject) => { + console.log('thumbnail jpeg') + const jpegPath = jpegPath + '.jpg' + execFile(process.env.CONVERT_BINARY, [fullPath, '-resize', w + 'x' + h, '-quality', 90, jpegPath], (err, stdout, stderr) => { + // console.log(stdout, stderr) + resolve() + }) + }) +} function processImage(file) { return new Promise ( (resolve, reject) => { // process image? |
