[R] Loading an image/picture (png/jpeg/...) to screen...

baptiste auguie baptiste.auguie at googlemail.com
Mon Jun 7 07:37:12 CEST 2010


On 7 June 2010 01:16, Oliver <oliver at first.in-berlin.de> wrote:
> baptiste auguie <baptiste.auguie <at> googlemail.com> writes:
>
>>
>> Hi,
>>
>> Try this,
>>
>> library(png)
>> example(readPNG)
> [...]
>
>
> If "rasterImage" would be available, I think this would be the right hint.

It is available when you use the latest release of R. For an
alternative, you might want to check the wiki <
http://rwiki.sciviews.org/doku.php?id=tips:graphics-misc:display-images&s=graphics
>. Another example using Grid graphics,

library(gridExtra)
library(EBImage)
library(RGraphics)
x <- readImage("http://www.google.com/logos/teachersday09.gif")
g1 <- ebimageGrob(x)
dev.new(width=g1$width, height=g1$height)
grid.draw(g1)


HTH,

baptiste

>
> But it isn't.
>
> So I can load the pic, but not display it. :(
>
>
> Ciao,
>  Oliver
>
> ______________________________________________
> R-help at r-project.org 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.
>



More information about the R-help mailing list