frame_list should be a list of base64-encoded png files
(frame_list, frame_format)
| 733 | |
| 734 | |
| 735 | def _embedded_frames(frame_list, frame_format): |
| 736 | """frame_list should be a list of base64-encoded png files""" |
| 737 | if frame_format == 'svg': |
| 738 | # Fix MIME type for svg |
| 739 | frame_format = 'svg+xml' |
| 740 | template = ' frames[{0}] = "data:image/{1};base64,{2}"\n' |
| 741 | return "\n" + "".join( |
| 742 | template.format(i, frame_format, frame_data.replace('\n', '\\\n')) |
| 743 | for i, frame_data in enumerate(frame_list)) |
| 744 | |
| 745 | |
| 746 | @writers.register('html') |