Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Text color not honored by image_annotate() using Windows magick package in R #370

Open
bevanward opened this issue Mar 2, 2023 · 0 comments

Comments

@bevanward
Copy link

When adding text to an image in R the color is not honored and is always black.

This works in Linux however not in windows.

To reproduce the error the following code shows the issue.

Thanks

library(magick)

height <- 100
width <- 80

X <- array(
          runif(height * width * 3, min = 0, max = 255),
          dim = c(height, width, 3)
          )

img <- magick::image_read(X / 255) %>% magick::image_scale("500x400")
img <- magick::image_annotate(img, text = "Example", gravity = "northeast", location = "+50+50", font = "times", size ="20", color = "white")

print(img)

image_write(img, path = "c:/temp/ouput.png")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant