Rules for transparency mask images:
- BitsPerSample must be 1.
- SamplesPerPixel must be 1.
- If NewSubfileType defines a transparency mask the PhotometricInterpretation value must be 4.
Invalid tags:
- GrayResponseCurve, GrayResponseUnit should not be present, as it is only valid for Grayscale images.
- Threshholding tag should not be present, as is only valid with Grayscale images.
- CellLength, CellWidth should not be present, as it is only for bilevel images.
- ColorMap should not be present, as is only used for Palette images.
- InkSet, InkNames, NumberOfInks, DotRange, TargetPrinter should not be present, as are only used for CMYK images.
- TransferRange should not be used as it is defined only for RGB and YCbCr PhotometricInterpretations.
- YCbCrCoefficients, YCbCrSubsampleHoriz, YCbCrSubsampleVert, YCbCrSubSampling, YCbCrPositioning tags should not be present since are only used in YCbCr images.
With an Hexadecimal Editor (e.g. HxD) edit the tags and its values.
The BitsPerSample tag id is 258 (hex 0x0102
).
The ColorMap tag id is 277 (hex 0x0115
).
Change the photometric interpretation of a non-transpaency mask image to 4.