Currently I am trying to utilize libtiff.net library for processing digital Tiff images. but the image that I have is not with standard ones.
The image contains 3 samples per pixel. And it is LZW compressed.
My question is: how to read the value of each pixel value. I have tried ReadScanline method. Values returned are all 0's. Is there any other method which returns the RGB pixel values?
I have other images with 5 samples per pixels and its not compressed. I could use ReadScanLine and it worked fine with the below code.
Here is my code snippet:
tiffReader = Tiff.ClientOpen("SomeTiff", "r", tiffStream, new TiffStream());
int imgHeight = tiffReader.GetField(TiffTag.IMAGELENGTH)[0].ToInt();
for (int rowIdx = 0; rowIdx < imgHeight; rowIdx++)
{
tiffReader.ReadScanline(totalScanline, rowIdx);
'use totalScanline
}
thanks in advance