Ashim Kapoor
2019-Feb-25 07:27 UTC
[R] magick package says format is PNG when we load an SVG.
Dear All, Here is a MWE : library(magick) tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400) print(tiger) ## format width height colorspace matte filesize density ## 1 PNG 400 400 sRGB TRUE 0 72x72 Why does the format say PNG ? Should it not say SVG? We just read an SVG file. Can someone please explain? Best Regards, Ashim [[alternative HTML version deleted]]
peter dalgaard
2019-Feb-25 09:40 UTC
[R] magick package says format is PNG when we load an SVG.
The image format in magick is raster based, not vector based, no? So I'd expect that image_read_svg() converts the file on the fly. -pd> On 25 Feb 2019, at 08:27 , Ashim Kapoor <ashimkapoor at gmail.com> wrote: > > Dear All, > > Here is a MWE : > > library(magick) > tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', width = 400) > print(tiger) > > ## format width height colorspace matte filesize density > ## 1 PNG 400 400 sRGB TRUE 0 72x72 > > Why does the format say PNG ? Should it not say SVG? We just read an SVG file. > > Can someone please explain? > > Best Regards, > > Ashim > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
Ashim Kapoor
2019-Feb-25 10:01 UTC
[R] magick package says format is PNG when we load an SVG.
Dear Peter, So when I convert from PDF to SVG it will first convert to raster and then back to vector ? Is'nt there a way of preventing this ? Many thanks, Ashim On Mon, Feb 25, 2019 at 3:10 PM peter dalgaard <pdalgd at gmail.com> wrote:> The image format in magick is raster based, not vector based, no? So I'd > expect that image_read_svg() converts the file on the fly. > > -pd > > > On 25 Feb 2019, at 08:27 , Ashim Kapoor <ashimkapoor at gmail.com> wrote: > > > > Dear All, > > > > Here is a MWE : > > > > library(magick) > > tiger <- image_read_svg('http://jeroen.github.io/images/tiger.svg', > width = 400) > > print(tiger) > > > > ## format width height colorspace matte filesize density > > ## 1 PNG 400 400 sRGB TRUE 0 72x72 > > > > Why does the format say PNG ? Should it not say SVG? We just read an SVG > file. > > > > Can someone please explain? > > > > Best Regards, > > > > Ashim > > > > [[alternative HTML version deleted]] > > > > ______________________________________________ > > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > > https://stat.ethz.ch/mailman/listinfo/r-help > > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > -- > Peter Dalgaard, Professor, > Center for Statistics, Copenhagen Business School > Solbjerg Plads 3, 2000 Frederiksberg, Denmark > Phone: (+45)38153501 > Office: A 4.23 > Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com > > > > > > > > > >[[alternative HTML version deleted]]