Error in R: magick_image_annotate() on macOS NonconformingDrawingPrimitiveDefinition `text' @ error/draw.c/RenderMVGContent/4405

147 views Asked by At

I'm new to macOS, and I can't get the image_annotate() function to work in the magick package in R.

Code:

img = image_read("--- any png path ---")
image_annotate(img,"test")

Error:

Error in magick_image_annotate(image, text, gravity, location, degrees,  : 
  rsession-arm64: NonconformingDrawingPrimitiveDefinition `text' @ error/draw.c/RenderMVGContent/4405

My magick configuration:

require(magick)
Loading required package: magick
Linking to ImageMagick 6.9.12.3
Enabled features: cairo, fontconfig, freetype, heic, lcms, pango, raw, rsvg, webp
Disabled features: fftw, ghostscript, x11

magick_config()
$version
[1] ‘6.9.12.3’

$modules
[1] FALSE

$cairo
[1] TRUE

$fontconfig
[1] TRUE

$freetype
[1] TRUE

$fftw
[1] FALSE

$ghostscript
[1] FALSE

$heic
[1] TRUE

$jpeg
[1] TRUE

$lcms
[1] TRUE

$libopenjp2
[1] TRUE

$lzma
[1] TRUE

$pangocairo
[1] TRUE

$pango
[1] TRUE

$png
[1] TRUE

$raw
[1] TRUE

$rsvg
[1] TRUE

$tiff
[1] TRUE

$webp
[1] TRUE

$wmf
[1] FALSE

$x11
[1] FALSE

$xml
[1] TRUE

$`zero-configuration`
[1] TRUE

$threads
[1] 1

I guess Ghostscript should be enabled (it is under windows), is there a way to just enable it?

I tried some more brew installations like

brew install gs
brew install fontconfig
brew install librsvg

and a lot more reinstallations of magick packages. Everything seems fine, but image_annotate() still produce this error.

0

There are 0 answers