bittermelon v2.1.1
New features
-
New
as.data.frame.bm_bitmap()andas.data.frame.bm_pixmap()which returns
a data frame with (x,y) coordinates for the bitmap pixels (#78).
Thanks @coolbutuseless for suggestion. -
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 (#85). -
New
as_bm_bitmap()/as_bm_pixmap()class methods:as_bm_bitmap.lofi-matrix()/as_bm_pixmap.lofi-matrix()(from{lofifonts})
Bug fixes and minor improvements
- The
bgandfgarguments offormat.bm_bitmap()andprint.bm_bitmap()
now accept a (single){cli}ANSI style function
in addition to lists of{cli}ANSI style functions
and character vectors of R color strings. bm_downscale()no longer returns invisibly.as_bm_bitmap.array()/as_bm_pixmap.array()can now handle "raw"
arrays as returned bypdftools::pdf_render_page(numeric = FALSE)andwebp::read_webp(numeric = FALSE)(#83).col2int()now uses{colorfast}to make the conversion if available.
If{colorfast}is unavailable will fall back to{farver}if available.
If neither are available will throw an error (#66).