即使指定了IMWRITE_JPEG_QUALITY为100还是不行
cv2.imwrite('test.jpg', img, [int(cv2.IMWRITE_JPEG_QUALITY), 100])
test = cv2.imread('test.jpg')
print(test.dtype, img.dtype)
print(test == img)
换成PNG格式是可以的
cv2.imwrite('test.png', img, [int(cv2.IMWRITE_PNG_COMPRESSION ), 0])
test = cv2.imread('test.png')
print(test.dtype, img.dtype)
print(test == img)
wired。。。。