Skip to content

Commit 559e3d2

Browse files
Merge pull request #179 from lakshyabatman/development
Profile Pictures will have same size of 300*300
2 parents a076877 + bff00c1 commit 559e3d2

File tree

5 files changed

+563
-18
lines changed

5 files changed

+563
-18
lines changed

controller/image.controller.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
const Jimp=require('jimp')
2+
3+
module.exports={
4+
ppResize:function(img,height,width){
5+
imgDir="./views/uploads/profilePics/"+img
6+
console.log(typeof(imgDir))
7+
Jimp.read(imgDir, (err, img) => {
8+
if (err) throw err;
9+
img
10+
.resize(width,height)
11+
.quality(60)
12+
.write(imgDir)
13+
});
14+
}
15+
}

0 commit comments

Comments
 (0)