Checks for bitdepth and colortype.