Skip to content

bittermelon v2.1.1

Choose a tag to compare

@trevorld trevorld released this 16 Jan 17:27
· 28 commits to main since this release

New features

  • New as.data.frame.bm_bitmap() and as.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 bg and fg arguments of format.bm_bitmap() and print.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 by pdftools::pdf_render_page(numeric = FALSE) and webp::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).