Learn R Programming

svgedit (version 1.0.0)

insert_image: Insert a raster image (PNG/JPG) into an SVG document, replacing a target element

Description

Insert a raster image (PNG/JPG) into an SVG document, replacing a target element

Usage

insert_image(doc, label, image_file, dpi = 150)

Value

The modified SVG document (doc) with the image added and the target removed

Arguments

doc

An xml2 SVG document

label

The label of the target element to be replaced

image_file

Path to the PNG or JPG image to be inserted

dpi

The resolution to use when interpreting pixel units (in the template svg)