library(rimage)
oldpar <- par(no.readonly=TRUE)
par(mfcol=c(2, 1))
data <- read.jpeg("frogs.jpg")
title <- paste("JPEG image data (", nrow(data), "x", ncol(data), ",", attr(data, "type"), ")")
plot(data, main=title)
plot(fftImg(data), main="Fourier Spectrum")
par(oldpar)
