private AbstractTransparencyFilter getTransparencyFilter(final PngColorType pngColorType, final PngChunk pngChunktRNS)
            throws ImagingException, IOException {
        switch (pngColorType) {
        case GREYSCALE: // 1,2,4,8,16 Each pixel is a grayscale sample.
            return new TransparencyFilterGrayscale(pngChunktRNS.getBytes());
        case TRUE_COLOR: // 8,16 Each pixel is an R,G,B triple.
            return new TransparencyFilterTrueColor(pngChunktRNS.getBytes());
        case INDEXED_COLOR: // 1,2,4,8 Each pixel is a palette index;
            return new TransparencyFilterIndexedColor(pngChunktRNS.getBytes());
        case GREYSCALE_WITH_ALPHA: // 8,16 Each pixel is a grayscale sample,
        case TRUE_COLOR_WITH_ALPHA: // 8,16 Each pixel is an R,G,B triple,
        default:
            throw new ImagingException("Simple Transparency not compatible with ColorType: " + pngColorType);
        }
    }
Gets TIFF image metadata for a byte source.

@param byteSource The source of the image.
@return TIFF image metadata.
@throws ImagingException In the event that the specified content does not conform to the format of the specific parser implementation.
@throws IOException      In the event of unsuccessful data read operation.
@since 1.0-alpha6
src/main/java/org/apache/commons/imaging/formats/png/PngImageParser.java