on_image_resource_ready method

on_image_resource_ready

Called for each raster image in SVG. Use it to specify how to store the raster image.

Returns

Should return path to saved resource. Path will be used in SVG image to refer to raster content. Path should be relative to target SVG document.

def on_image_resource_ready(self, image_data, image_type, suggested_file_name, use_embedded_image):
    ...
ParameterTypeDescription
image_databytesThe bytes of the raster image content
image_typeSvgImageTypeType of the image.
suggested_file_namestrName of the suggested file.
use_embedded_imageanyif set to true then image will be embedded into SVG.

See Also