Reputation: 1
In the App Engine imaging API, it tells me that I can resize an image by using the command: img.resize(width=80, height=100)
But from the example it looks like the image size is being reduced. Can the image size be increased instead? Can I take a 175x100 image and make it 350x200, or some other fixed resolution? (I understand there might be some loss of fidelity, but its more important for the picture to have a certain size)
My use case is that we have an app that displays LinkedIn profile pictures in cards. These profile pictures, however, are of different resolutions. The images need to be the same size or else the UI looks jarring as the users swipe through the cards.
Upvotes: 0
Views: 161
Reputation: 11370
Yes. Per: https://cloud.google.com/appengine/docs/python/images/imageclass#Image_resize
"Resizes an image, scaling down or up to the given width and height. The resize transform preserves the aspect ratio of the image. If both the width and the height arguments are provided, the transform uses the dimension that results in a smaller image."
Upvotes: 1