I have seen the process to convert a png file to base64 work in the post below Convert R image to Base 64
I would like to do the exact opposite of what you did. I ha
this works for me:
library(base64enc)
enc <- base64encode("images.jpg")
conn <- file("w.bin","wb")
writeBin(enc, conn)
close(conn)
inconn <- file("w.bin","rb")
outconn <- file("img2.jpg","wb")
base64decode(what=inconn, output=outconn)
close(inconn)
close(outconn)
images.jpg courtesy of Wikipedia accessed from here