Skip to content

Problems with RasterImage and Animations #68

@manutiedra

Description

@manutiedra

Hello,

I was tinkering with animations and I started using RasterImage with animation.SaveAsAnimatedSVG and it works fine.
However, if I use animation.SaveAsAnimatedSVGWithFrames instead, it didn't show the raster images in the resulting animation.

When I use the animation.SaveAsAnimatedSVG I've got image tags like this:

<image x="0" y="0" width="1" height="1" preserveAspectRatio="none" image-rendering="optimizeQuality"
transform="matrix(30,0,0,30,105,105)" d2p1:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOtAAIDx0lEQVR4Aey9WaxuyXUeVrX//9x7+07d9/bI5sxms9nNQRJFkdRsWaM1UmIAI0BeAgQISNuJLQsh4SSWXvNmIA9C8uoAeclLHJF+sDXAiKQkaoqy4bfkMQOSPAgwFQ9p3nNStcZvrar9n/+ce/tcBmdXV/93n71rV61ateYa9v7s7Kwcnb7zne/s9/uvfOUrv/3bv90u2p/Hv7ulLW1pS1t64qnW2sR4E8h//ud/fvfu3dPT02VZjnx3v43Hlra0pS1dz7QpgC1taUtbuqZpUwBb2tKWtnRN06YAtrSlLW3pmqZNAWxpS1va0jVNmwLY0pa2tKVrmjYFsKUtbWlL1zRtCmBLW9rSlq5p2hTAlra0pS1d07QpgC1taUtbuqZpUwBb2tKWtnRN06YAtrSlLW3pm

and keeps going...

but when using animation.SaveAsAnimatedSVGWithFrames I've got this only:

<image x="0" y="0" width="1" height="1" preserveAspectRatio="none" image-rendering="optimizeQuality"
transform="matrix(30,0,0,30,105,105)" d2p1:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAIAAAB7GkOt" xmlns:d2p1="http://www.w3.org/1999/xlink" />

Also, when I was using only vectors, I've got a 7MB file (using animation.SaveAsAnimatedSVG). When I added a 100KB PNG file with RasterImage and the size of the resulting animation changed to 77 MB.

I really don't know anything about the SVG file format, but I could see that after each animate tag the font data and the images where repeated.

Can't the images be defined once in the defs tag and then use them with the use tag instead of using the image tag?
Can something similar be done to the fonts? It will reduce the size by a lot.

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