zsh: added image conversion function