Reputation: 11132
Does Node gm have built-in support for resizing an image while preserving aspect ratio (ie., generating a thumbnail)? Or should I get the image size, calculate the proper ratio, and then call resize?
This question is inspired by PIL's similar functionality.
Upvotes: 3
Views: 5218
Reputation: 11132
Jonathan's comment is the solution:
gm().resize(maxSize)
This resizes the image to width maxSize
. See the relevant documentation.
Upvotes: 3