We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Do what ImageMagick can do this with convert in.jpg -level 5%,95%,1 out.jpg
but much faster
image = pyvips.Image.new_from_file(sys.argv[1]) low = image.percent(5) high = image.percent(95) image = (image - low) * (255 / (high - low)) image.write_to_file(sys.argv[2])