79804853

Date: 2025-10-30 14:18:06
Score: 1
Natty:
Report link

Thanks for your answer. This helped me in finding the solution, which was actually fairly obvious ;)

if ((PhotoMetric == PHOTOMETRIC_MINISWHITE) || (PhotoMetric == PHOTOMETRIC_MINISBLACK) || (SamplesPerPixel == 1)) {
    if (BitsPerSample == 1)
        Type = PRESCRENED_TIFF_IMAGE;
    else
        Type = MONOCHROME_TIFF_IMAGE;
} else if (SamplesPerPixel == 4) {
    if (PhotoMetric == PHOTOMETRIC_SEPARATED)
        Type = CMYK_TIFF_IMAGE;
    else
        Type = OTHER_TIFF_IMAGE;
} else
    Type = OTHER_TIFF_IMAGE;
Reasons:
  • Blacklisted phrase (0.5): Thanks
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Bart Theelen