Open KeyWorksRW opened 1 year ago
Embedding an SVG file now works. For the 1.x release, we should probably take the same approach to XPM files so that they can be embedded. Animation files could be done this way, but we'll need to add python stream code in order to get it into the animation control.
Description:
Currently, SVG, XMP and Animation images have to be external (animation images are currently broken until we decide how to handle these three types).
zlib.decompress(string) supposedly takes a compressed binary string and decompresses it into a string. That means we should be able to create a Base64 rendering of an SVG file and decompress it into an actual SVG string to hand to FromSVG.
If we can get zlib.decompress(string) to work, then we could also compress XMP files as well (we already compress SVG files). I think we're stuck with animation files being external unless we can figure out how to convert the results of zlib.decompress(string) to a stream.