CWPix to cg_wpix class