node-imager icon indicating copy to clipboard operation
node-imager copied to clipboard

Make resizing actually resize to the given dimensions

Open pruhstal opened this issue 12 years ago • 1 comments

By default, using gm to resize will resize to what it deems the best constraint proportionally sized image (unless you pass in "!" as the third argument for resize()). It should still resize the images, but with the size that was passed in. Not sure if this is a node-gm thing in itself, but I spent some time trying to figure it out and it seems the only way to fix it is to force a crop, or use the third param (which won't resize it proportionally).

pruhstal avatar Jul 22 '13 08:07 pruhstal

.resize(preset.size.split('x')[0], preset.size.split('x')[1], '^') in lib/imager.js:343 would fix this behaviour

LucidityDesign avatar Jul 12 '15 11:07 LucidityDesign