If I save my RAW file in .tiff format “compression” mode, is this lossless comperssion or not?
It’s lossless.
From the test that I carried out it does not seem lossless at least at 16 bit
What test? Please provide some evidence of this.
That would indicate a very severe bug if it is indeed the case.
Sorry, I could not reproduce it today with 5.8, maybe there was a problem with my profile.
The test that I usually carry out uses a under exposed image:
I export the image as it is at 16 bit with compression or not.
I perform an exposure compensation (e.g. 9) on the derivative files. I do a visual check (yesterday it was visible) and then a programmatic test using this Python script that uses PIL external library:
from PIL import Image, ImageChops
img1 = Image.open("_DSC0315noncomp.tif")
img2 = Image.open("_DSC0315comp.tif")
diff = ImageChops.difference(img1, img2)
# findig extrema in this case diff should be zero.
if diff.getextrema() != ((0, 0), (0, 0), (0, 0)):
print("Different images")
# showing the difference
diff.show()
Sorry for this false alarm, I’ll let you know if it happens again.
Pillow does not work w/ 16-bit RGB files of any kind, it converts internally to 8-bits (i.e. throws away LSBs). It only supports 16-bit grayscale.
Try e.g. w/ OpenCV’s cv2.imread instead.
Or tifffile
Or ImageMagick’s compare
.