cast before doing vigra.colors.applyColortable