use numpy to switch r and b instead of imagemagick commandline