Hi,
You could try the RGtk2 package using the GtkImage widget.
Like this:
library(RGtk2)
win <- gtkWindow()
image <- gtkImage(filename="foo.jpg")
win$add(image)
Should be fast...
if you need to draw R graphics on top of the image, you'd need to do
something a bit different and more complicated (draw R graphics to a pixmap
using cairoDevice and then superimpose the pixmap onto the image in the
expose handler for a GtkDrawingArea).
Hope this helps,
Michael
On 4/20/07, Issac Trotts <issac.trotts@gmail.com>
wrote:>
> Does someone here know of a way to display images in R that isn't slow?
> Here are the things I've tried so far:
>
> library(rimage)
> i<-read.jpeg('foo.jpg')
> plot(i) # very slow
>
> library(pixmap)
> i <- read.pnm('foo.pnm')
> plot(i) # also slow
>
> chans <- getChannels(i)
> image(chans[,,1]) # this is slow too
>
> I also tried using library(cairoDevice) but it only makes everything look
> beautiful without making the images fast.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>
[[alternative HTML version deleted]]