How do you get the screenshot as a gif?
1. Load the base64 into a image. This is done asycronously.
2. When the image is loaded, draw that image to a canvas of the same size.
However if after taking the screenshot you just want to load it again then converting it to gif first is a needless step.