Closed
Description
I am trying to subtract two images and truncate the result to a given range, e.g. for 16bit integer images to 0 - 65535. The idea behind is that there is no negative signal/intensity in real images. I have tried subtract() and casting the result type but this would simply wrap negative values around the maximum value (like C does). What is the best way to achieve this? Maybe I have overlooked some simple libvips function which does the truncation?
Thanks for help,
Thomas