cpp: test: Scale TIFF test images between the type min and max