I want to save an image to a tiff files as 8 bits and 16 bits, my code as follow:
switch (ImgFmtType) {
case 0: //8#20301;TIFF
imgTmpNavi->IO->Params->BitsPerSample = 8;
imgTmpNavi->IO->Params->SamplesPerPixel = 1;
imgTmpNavi->IO->Params->TIFF_DocumentName = "CT";
imgTmpNavi->IO->Params->TIFF_Compression = ioTIFF_UNCOMPRESSED;
imgTmpNavi->IO->SaveToFileTIFF(ImgFileName);
break;
case 1: //16#20301;TIFF
imgTmpNavi->IO->Params->BitsPerSample = 16;
imgTmpNavi->IO->Params->SamplesPerPixel = 1;
imgTmpNavi->IO->Params->TIFF_DocumentName = "CT";
imgTmpNavi->IO->Params->TIFF_Compression = ioTIFF_UNCOMPRESSED;
imgTmpNavi->IO->SaveToFileTIFF(ImgFileName);
break;
but I get same result, why? What's wrong? Thank you!