Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- library(dplyr)
- library(magick)
- red_on_black <- function(image) {
- image %>%
- image_negate() %>%
- image_transparent("white", fuzz = 75) %>%
- image_background("red", flatten = TRUE) -> dark_image
- return(dark_image)
- }
- chart <- image_read("numele_fisierului_salvat_de_pe_aavso.png")
- red_chart <- red_on_black(chart)
- image_write(red_chart, "rosu_pe_negru.png")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement