Changes to support monochrome frames.