Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
in R Programming by (50.2k points)
I just want to know that how can we convert a .png to .svg using only base R or CRAN functions?

1 Answer

0 votes
by (108k points)

I think for conversion, you can see the image_convert function from the magick package. Check the package description and the 'Converting formats' section from the package vignette.


my_image <- image_read("image.png")

my_svg <- image_convert(my_image, format="svg")

image_write(my_svg, "image.svg")


[1] "image.png"   "image.svg"

If you are a beginner and want to know more about R then do check out the following R programming tutorial

Related questions

Browse Categories