Added support for 4BPP and 8BPP.