convert dib to cvImage: need to be test and fix