This commit is contained in:
Flummi 2017-11-14 02:31:18 +01:00
parent 342825653e
commit c6798f7a08
2 changed files with 5 additions and 2 deletions

View File

@ -115,6 +115,7 @@ self.generateThumbs = () => {
}
else
exec('convert '+thumbnail+' -resize "128x128^" -gravity center -crop 128x128+0+0 +repage '+thumbnail, (error) => {
if(error) console.log(error);
self.log((error?'failed':'generated') + ' thumbnail for '+e.id+' ('+e.mime+')');
});
});
@ -122,6 +123,7 @@ self.generateThumbs = () => {
case "image/png":
case "image/jpeg":
exec('convert '+e.dest+' -resize "200x200^" -gravity center -crop 128x128+0+0 +repage '+thumbnail, (error) => {
if(error) console.log(error);
self.log((error)?'failed thumbnail for '+e.id+' ('+e.mime+')':'generated thumbnail for '+e.id+' ('+e.mime+')');
});
break;
@ -133,6 +135,7 @@ self.generateThumbs = () => {
dat.on('finish', () => {
dat.close();
exec('convert '+thumbnail+' -resize "200x200^" -gravity center -crop 128x128+0+0 +repage '+thumbnail, (error) => {
if(error) console.log(error);
self.log((error)?'failed thumbnail for '+e.id+' ('+e.mime+')':'generated thumbnail for '+e.id+' ('+e.mime+')');
});
});