Closed aappiah17 closed 3 years ago
It's unlikely that it's a ggtext issue. Does this work for you?
magick::image_read("https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/20140427Iris_versicolor1.jpg/320px-20140427Iris_versicolor1.jpg")
Created on 2021-05-12 by the reprex package (v1.0.0)
Yes, it works. I use magick and ggimage usually with web links and they work fine. I was trying to use images as axis labels
Sorry, I was confused. I'm not actually using magick, I'm using jpeg::readJPEG()
: https://github.com/wilkelab/gridtext/blob/master/R/read-image.R
So, does the following work for you?
img <- jpeg::readJPEG(RCurl::getBinaryURL("https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/20140427Iris_versicolor1.jpg/320px-20140427Iris_versicolor1.jpg"))
grid::grid.raster(img)
Created on 2021-05-12 by the reprex package (v1.0.0)
I get that error again.
img <- jpeg::readJPEG(RCurl::getBinaryURL("https://upload.wikimedia.org/wikipedia/commons/thumb/2/27/20140427Iris_versicolor1.jpg/320px-20140427Iris_versicolor1.jpg"))
#> Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
Created on 2021-05-12 by the reprex package (v1.0.0)
Yeah, so it's probably an issue with RCurl. Maybe an installation problem? Definitely not a ggtext issue, since that latest example doesn't use any ggtext functions.
Maybe this explains it: https://twitter.com/opencpu/status/1131264122203492352?s=20
If you want to prepare a PR to gridtext (https://github.com/wilkelab/gridtext/) replacing RCurl with curl I'll welcome it.
Thanks. Will prepare a PR.
I get the following error when trying use to use web images as axis labels: Error in function (type, msg, asError = TRUE) : error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version.
Even trying to reproduce the example in the package documentation produces the same error