mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-10 16:05:49 +01:00
fixed #1515
This commit is contained in:
@@ -15,10 +15,12 @@ image.resizeImage = function(path, extension, width, height, callback) {
|
|||||||
gm().in(path)
|
gm().in(path)
|
||||||
.in('-coalesce')
|
.in('-coalesce')
|
||||||
.in('-resize')
|
.in('-resize')
|
||||||
.in(width+'x'+height)
|
.in(width+'x'+height+'^')
|
||||||
.write(path, done);
|
.write(path, done);
|
||||||
} else {
|
} else {
|
||||||
gm(path)
|
gm(path)
|
||||||
|
.in('-resize')
|
||||||
|
.in(width+'x'+height+'^')
|
||||||
.gravity('Center')
|
.gravity('Center')
|
||||||
.crop(width, height)
|
.crop(width, height)
|
||||||
.write(path, done);
|
.write(path, done);
|
||||||
|
|||||||
Reference in New Issue
Block a user