We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
This resizes an image to within a bounding box. Make the first parameter very large to just scale to height.
def resize(filein, fileout, maxw, maxh): out = pyvips.Image.thumbnail(filein, maxw, height=maxh) out.write_to_file(fileout, Q=95)
It uses the thumbnail function of vips - which has a lot of features (and doesn't just make thumbnails).