Use ImageMagick instead of GraphicsMagick
This commit is contained in:
@@ -7,11 +7,15 @@ import * as express from 'express';
|
||||
import * as bodyParser from 'body-parser';
|
||||
import * as cors from 'cors';
|
||||
import * as mongodb from 'mongodb';
|
||||
import * as gm from 'gm';
|
||||
import * as _gm from 'gm';
|
||||
import * as stream from 'stream';
|
||||
|
||||
import DriveFile, { getGridFSBucket } from '../api/models/drive-file';
|
||||
|
||||
const gm = _gm.subClass({
|
||||
imageMagick: true
|
||||
});
|
||||
|
||||
/**
|
||||
* Init app
|
||||
*/
|
||||
@@ -78,6 +82,7 @@ function thumbnail(data: stream.Readable, type: string, resize: number): ISend {
|
||||
const stream = g
|
||||
.compress('jpeg')
|
||||
.quality(80)
|
||||
.noProfile() // Remove EXIF
|
||||
.stream();
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user