gridExtra (version 0.9.1)

ebimageGrob: create a grob from EBImage object

Description

create a grob from EBImage object

Usage

ebimageGrob(pic, x = 0.5, y = 0.5, scale = 1,
    raster = FALSE, angle = NULL, ...)

Arguments

pic
object of class Image
x
x unit
y
y unit
scale
numeric scale factor
raster
logical: use rasterGrob(R>=2.11) or imageGrob(RGraphics)
angle
numeric: angle in degrees
...
optional grob parameters, passed to imageGrob or rasterGrob

Value

  • a gTree of class 'ebimage', with natural width and height in points

Details

Very primitive function, using RGraphics' imageGrob or rasterGrob (R>2.11)

See Also

Other grob userlevel: arcTextGrob, barbedGrob, borderGrob, colorstripGrob, ellipseGrob, interleaven, ngonGrob, patternGrob, pixmapGrob, rpatternGrob, stextGrob, tableGrob, virtualGrob

Examples

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

Run the code above in your browser using DataLab