Skip to content
Prev 74920 / 398502 Next

how to read individual values from a pixmap object

On Thu, 4 Aug 2005, Tony Gill wrote:

            
There are lots of ideas in the S4 Classes and Methods useR! 04 keynote
talk given by pixmap maintainer Friedrich Leisch at:  

http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Leisch.pdf

but the easiest one is:
Pixmap image
  Type          : pixmapGrey 
  Size          : 1x1 
  Resolution    : 1x1 
  Bounding box  : 0 0 1 1
[,1]
[1,]    1

unless you use a hammer and chisel:
Formal class 'pixmapGrey' [package "pixmap"] with 6 slots
  ..@ grey    : num [1, 1] 1
  ..@ channels: chr "grey"
  ..@ size    : int [1:2] 1 1
  ..@ cellres : num [1:2] 1 1
  ..@ bbox    : num [1:4] 0 0 1 1
  ..@ bbcent  : logi FALSE
[,1]
[1,]    1