[R] size of a pixmap image

Tito de Morais Luis Luis.Tito-de-Morais at ird.sn
Thu Aug 7 18:30:43 CEST 2003


Dear listers,

I loaded a pixmap image with:
brobo <- read.pnm("brobo.pnm")

I can have the characteristics of the image with:
> brobo
Pixmap image
  Type          : pixmapRGB
  Size          : 609x682
  Resolution    : 1x1
  Bounding box  : 0 0 682 609

How can I retrieve the image size ?
nrow(brobo) and ncol(brobo) give NULL

I succeeded using:

> nrow(getChannels(brobo))
[1] 609
> ncol(getChannels(brobo))
[1] 682

It looks a bit tricky, is there another way ?

Thanks in advance,

Tito

Running Mandrake 9.1

> version
         _
platform i686-pc-linux-gnu
arch     i686
os       linux-gnu
system   i686, linux-gnu
status
major    1
minor    7.1
year     2003
month    06
day      16
language R


-- 
L. Tito de Morais
      UR RAP
   IRD de Dakar
      BP 1386
       Dakar
      Sénégal

Tél.: + 221 849 33 31
Fax: +221 832 16 75
Courriel: tito at ird.sn




More information about the R-help mailing list