Reads an image from a path or a magick image object and returns a field data frame (x, y, z and r,
g, b) for geom_halftone() or geom_halftone_cmyk(). When invert = TRUE, dark pixels get high tone.
Requires the magick package.
Usage
halftone_raster(
img,
max_px = 160,
channel = c("luminance", "red", "green", "blue"),
invert = TRUE
)