The image does not display properly, it is rotated 90 degrees to the left.
library("png")
library("ggplot2")
download.file("https://upload.wikimedia.org/wikipedia/commons/7/70/Example.png",
"wiki.png", mode = 'wb')
img = readPNG("wiki.png")
grd = expand.grid(1:178, 1:172)
dim(img) = c(178 * 172, 3)
img = as.data.frame(img)
img = cbind(grd, img)
colnames(img) = c("X", "Y", "R", "G", "B")
img$RGB = rgb(img$R, img$G, img$B)
ggplot(img, aes(x = X, y = Y, fill = RGB)) +
geom_raster() +
scale_fill_identity()