Handle 24 or 16 bit depth with 1 or 2 channels