Write entire image
Writing TIFF images with certain combinations of photometric configuration and
the number of samples per pixel is not recommended. The value of
SamplesPerPixel
must be equal to the sum of
Photometric
color channels and the
ExtraSamples
specified in the Tiff
object.