papilio <- getimg(system.file("testdata/images/butterflies/papilio.png", package = "pavo"))
# \donttest{
# Convert from class rimg to cimg
if (requireNamespace("imager", quiety = TRUE)) {
papilio_cimg <- rimg2cimg(papilio)
class(papilio_cimg)
}
# }
# Convert from class rimg to magick-image
papilio_magick <- rimg2magick(papilio)
class(papilio_magick)
Run the code above in your browser using DataLab