Français

Using SVG graphics

SVG = Scalable Vector Graphics

In step 6, click on the Download the SVG code of the graphic button.

Save the image with the .svg extension, for example as tree-01.svg

To insert the SVG graphic into a word processor

such as Word or LibreOffice Writer : the SVG graphic can be entered directly, just like an image of another type (such as JPG or PNG) :

Insert > Image > Select .svg file

No conversion is therefore necessary.

To convert the SVG graphic to a PNG image (= Portable Network Graphics)

To obtain the desired dimensions of the PNG image, start by modifying the dimensions of the SVG graphic. For example, to multiply each dimension by 4, modify the

<svg width="400" height="300"

as follows :

<svg width="1600" height="1200"

This preserves the aspect ratio of the image.

The rest of the code remains unchanged, in particular viewBox="..." must not be modified.

If we start from this enlarged SVG, the conversion results in a much higher-quality PNG image.

You can then switch from SVG to PNG format

  • with the free software Inkscape. (Format > Export in PNG format)
  • or via the conversion site https://svgtopng.com

To convert the SVG graphic to an EPS image (in French)

for example, to insert an SVG image into a TEX or LATEX document.

Contact  |  Home