Skip to content

change black and white point

Kirk Martinez edited this page Sep 30, 2019 · 3 revisions

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])

Clone this wiki locally