How do I snapshot as GIF image,better not as base64

0 favourites
  • 8 posts
From the Asset Store
2D fighting template based in the game that defined the fighting games genre.
  • Is there any way to snapshot stored as gif ?

    1.system condition snapshot can save screen shot as base64 png & jpg;but not gif;

    2.some browser on android can crash by open base64 image.

    any one can help me?

    Thank you very much.

  • Is there a solution?

  • To save as a gif file you'd need to use some js library that can generate a gif because by default only png/jpg is supported. However it will still be a base64 image.

  • To save as a gif file you'd need to use some js library that can generate a gif because by default only png/jpg is supported. However it will still be a base64 image.

    Thank you R0J0hound.

    It is very helpful to me.

    Although I also know little about js …… the road is indicated.

    As for base64

    is there any Curve way to save the country?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • How do you get the screenshot as a gif?

    The simplest way would be to get a snapshot as a png first, then you can run some JavaScript with either the browser object or your own plugin. You would:

    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.

    3. Utilize a JavaScript gif library to take the canvas and spit out a base64 gif.

    Skipping to just 3 and using c2's canvas likely won't work when webgl is used. Otherwise notice you cannot get away from base64, so the buggy browsers you allude to will still have an issue. There are probably many gif JavaScript libraries you can find via Google. Any will do, and each is used differently.

    However if after taking the screenshot you just want to load it again then converting it to gif first is a needless step.

  • Thank you so much R0J0hound;

    I found that the browser witch I wanted to publish the game on it, did not support base64 at all #O_O!

    Very antihuman, As long as the base 64 appears, it crashes.(A app called WeChat , the built-in browser,Very difficult to use.)

    I have to chang to normal browser, or is there any other way to export pic from C2 game ?

  • it's hard if the browser doesn't support that. Actually I can't think of any other way of saving a screenshot other than doing the screenshot button shortcut on android.

  • it's hard if the browser doesn't support that. Actually I can't think of any other way of saving a screenshot other than doing the screenshot button shortcut on android.

    That's right

    In fact, I am making an avatar generation tool

    Just want to keep the contents of the canvas

    Rather than batteries, signals ...

    Not necessarily screenshots,

    All I need is to output the image…

    …GIF is the best

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)