Merge pull request #550 from lbryio/remove-imagemagick

removed imagemagick npm package
This commit is contained in:
Bill Bittner 2018-07-31 09:09:00 -07:00 committed by GitHub
commit c22798223d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 31 deletions

5
package-lock.json generated
View file

@ -4395,11 +4395,6 @@
"resolved": "https://registry.npmjs.org/image-size/-/image-size-0.6.3.tgz",
"integrity": "sha512-47xSUiQioGaB96nqtp5/q55m0aBQSQdyIloMOc/x+QVTDZLNmXE892IIDrJ0hM1A5vcNUDD5tDffkSP5lCaIIA=="
},
"imagemagick": {
"version": "0.1.3",
"resolved": "https://registry.npmjs.org/imagemagick/-/imagemagick-0.1.3.tgz",
"integrity": "sha1-dIPOoJO02fLi85aFetyIIbU3xWo="
},
"import-lazy": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/import-lazy/-/import-lazy-2.1.0.tgz",

View file

@ -40,7 +40,6 @@
"get-video-dimensions": "^1.0.0",
"helmet": "^3.8.1",
"image-size": "^0.6.3",
"imagemagick": "^0.1.3",
"module-alias": "^2.0.6",
"mysql2": "^1.3.5",
"passport": "^0.4.0",

View file

@ -1,28 +1,5 @@
const imageMagick = require('imagemagick');
const sizeOf = require('image-size');
const getImageMetadata = (filePath) => {
return new Promise((resolve, reject) => {
imageMagick.readMetadata(filePath, (err, metadata) => {
if (err) {
reject(err);
}
resolve(metadata);
});
});
};
const getImageDetails = (filePath) => {
return new Promise((resolve, reject) => {
imageMagick.identify(filePath, (err, details) => {
if (err) {
reject(err);
}
resolve(details);
});
});
};
const getImageHeightAndWidth = (filePath) => {
return new Promise((resolve, reject) => {
try {
@ -35,7 +12,5 @@ const getImageHeightAndWidth = (filePath) => {
};
module.exports = {
getImageMetadata,
getImageDetails,
getImageHeightAndWidth,
};