bm_gray() grays a bitmap. bm_grey() is offered as an alias.
Usage
bm_gray(x)
bm_grey(x)
# S3 method for class 'bm_bitmap'
bm_gray(x)
# S3 method for class 'bm_list'
bm_gray(x)
# S3 method for class 'bm_pixmap'
bm_gray(x)
# S3 method for class '`magick-image`'
bm_gray(x)
# S3 method for class 'nativeRaster'
bm_gray(x)
# S3 method for class 'raster'
bm_gray(x)Arguments
- x
Either a
bm_bitmap(),bm_font(),bm_list(), "magick-image", "nativeRaster",bm_pixmap(), or "raster" object.
Value
Depending on x either a bm_bitmap(), bm_font(), bm_list(), magick-image, "nativeRaster", bm_pixmap(), or raster object.
Examples
corn <- farming_crops_16x16()$corn$portrait
corn_gray <- bm_gray(corn)
if (cli::is_utf8_output() && cli::num_ansi_colors() >= 256L) {
print(corn_gray, compress = "v")
}
#>
#> ▄▀▀▄▄▀█
#> █▀▀▀▀█▀▀▄
#> ▄▀▀▀█▀█▀▀▀▄
#> ▄▀▀▀█▀▀▀▀████
#> ▀▀▀ ▀▀▀▀▀▀▀██
#> ▀▀▀▀▀▀
#>