imageEncode outputs path to new file