improving cm_image parameter parsing with options