Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Research] GIX frame rendering could use canvas instead of SVG #42

Open
Zulko opened this issue Aug 22, 2021 · 0 comments
Open

[Research] GIX frame rendering could use canvas instead of SVG #42

Zulko opened this issue Aug 22, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@Zulko
Copy link
Owner

Zulko commented Aug 22, 2021

Motivation

in Gix, frames are composed and rendered using the SVG format. This is a very practical format:

  • It provides features for free (rotate, edge colors, transparency, font support via canvg, etc.)
  • SVG components are clickable and draggable, in particular with the Vue framework

But there are inconvenients:

  • SVG rendering means that each frame of the original asset must be converted to JPG, inserted in a SVG <image>, then it gets extracted by the SVG engine's JPG reader, and finally displayed. It should be much faster to just draw from a canvas to another.
  • SVG rendering may or may not be slower than canvas for bitmap images (unclear).

Note:

This is a lot of work and might not even be a good idea. But huge if it works.

Specs

  • Frame rendering for the gix-renderer uses only canvas operations instead of SVG+Canvg
  • All GIF features (stroke line, outline, transparency, etc.) are conserved.
  • Optional: the GixPlayer also uses canvas operation. Interactivity with that canvas is ensured either using Fabric, or by overlaying transparent SVG elements on top of the canvas.
@Zulko Zulko added the enhancement New feature or request label Aug 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant