python - cv2.imwrite Mangles TIFF Output -


i've been playing opencv 3.1.0 in python. code works great, when comes time write out tiff file, happens:

before: enter image description here

after: enter image description here

my code reproduce literally 2 lines:

f = cv2.imread('f.tif', 0) cv2.imwrite('test.tif', f) 

both f.tif , resulting test.tif 8-bit greyscale tiff files, according imagemagick.

writing image png instead of tiff works fine.


Comments