I have been searching for a while know and I can't find a solution to solve my problem. I'm using libtiff library to write huge ( > 10Go) tiled images. Without any compression, everything works fine. But problems start when I try to compress the tiles.
Here is my code:
TIFF *m_outBigTiffFile = TIFFOpen("HugeMapping.tif", "w+");
TIFFSetField(m_outBigTiffFile, TIFFTAG_IMAGEWIDTH, width);
TIFFSetField(m_outBigTiffFile, TIFFTAG_IMAGELENGTH, height);
TIFFSetField(m_outBigTiffFile, TIFFTAG_BITSPERSAMPLE, 8);
TIFFSetField(m_outBigTiffFile, TIFFTAG_COMPRESSION, COMPRESSION_JPEG);
TIFFSetField(m_outBigTiffFile, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
TIFFSetField(m_outBigTiffFile, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT);
TIFFSetField(m_outBigTiffFile, TIFFTAG_SAMPLESPERPIXEL, sampleperpixel);
TIFFSetField(m_outBigTiffFile, TIFFTAG_ROWSPERSTRIP, 1);
TIFFSetField(m_outBigTiffFile, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
TIFFSetField(m_outBigTiffFile, TIFFTAG_RESOLUTIONUNIT, RESUNIT_INCH);
TIFFSetField(m_outBigTiffFile, TIFFTAG_TILEWIDTH, tileW);
TIFFSetField(m_outBigTiffFile, TIFFTAG_TILELENGTH, tileH);
int tileSize = TIFFTileSize(m_outBigTiffFile)
When I try with the Tag COMPRESSION_JPEG or COMPRESSION_LWZ, the images cannot be opened. I have the folowwing errors trying to read : " LZWDecide : Corrupted LZW table at scanline 0" Or "JPEG compression support is not configured" Or " Not a JPEF file: starts with 0x4c 0x49
Does anyone have an idea of what could be the problem here? Thanks for your help :)