Merge branch 'master' of github.com:lbryio/spee.ch into 358-oEmbed

This commit is contained in:
bill bittner 2018-07-31 09:14:18 -07:00
commit 995d3f138b
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,
};