Skip to content

rasterimage return partial image #131

@meravwebs

Description

@meravwebs

i'm using this code:
$image = SVG::fromString($svg);
$doc = $image->getDocument();

$w = $doc->getWidth();
$h = $doc->getHeight();

$rasterImage = $image->toRasterImage($w, $h);

imagepng($rasterImage, $png_path);

it creates an image, but only partial.

the svg i'm using have image element in it and the image created is only part of the image element of the svg instead of the entire svg.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions