gif-encoder-2 icon indicating copy to clipboard operation
gif-encoder-2 copied to clipboard

Getting canvas from electron

Open rastographics opened this issue 4 years ago • 1 comments

@benjaminadk You mention in the readme about getting an instance of canvas right from electron (instead of importing the canvas npm package).

Do you have an example of how to do that? I can't find any examples on the web on how to do this.

rastographics avatar May 30 '20 02:05 rastographics

@rastographics - I just re-read the readme. So when I cobbled this together I was playing around with a GIF editor/recorder desktop built on top of electron - with a React UI - checkout the encoders here for some examples Electron Examples . You can also use FFMPEG to encode GIFs and it is by far the fastest, if I remember. That file is in there as well. Basically, all I mean by is that within Electron you have access to the Canvas API that, because you have access to the browser. As opposed to a typical Node app where there is no direct access to browser apis. Let me know if you have any questions about the code I linked.

benjaminadk avatar May 30 '20 02:05 benjaminadk