function isMask(image) {
  const fileDirectory = image.fileDirectory;
  const type = fileDirectory.NewSubfileType || 0;
  return (type & 4) === 4;
}
Determine if an image type is a mask.
See https://www.awaresystems.be/imaging/tiff/tifftags/newsubfiletype.html
@param {GeoTIFFImage} image The image.
@return {boolean} The image is a mask.