bm_pixel_picker() lets you use an interactive graphics device
to click on a bitmap's pixels and learn the
column/row coordinates for the clicked pixel and its integer/color value.
To end the program click a non-left mouse button within the graphics device.
Usage
bm_pixel_picker(x, ...)
# S3 method for bm_bitmap
bm_pixel_picker(
x,
...,
col = getOption("bittermelon.col", col_bitmap),
silent = FALSE
)
# S3 method for bm_pixmap
bm_pixel_picker(x, ..., silent = FALSE)
# S3 method for raster
bm_pixel_picker(x, ..., silent = FALSE)
Value
A list with named components "row", "col", and "value"
for the last clicked pixel returned invisibly.
Arguments
x
Either a bm_bitmap(), bm_pixmap(),
or raster object
...
Currently ignored.
col
Character vector of R color specifications.
First color is used for values equal to 0, second color for values equal to 1, etc.