Texture to Base64 and viceversa

0 favourites
  • 3 posts
From the Asset Store
Ambient Atmospheric Nature Music Inspired By Planet Earth
  • I'm trying to retrieve the texture data from a Sprite plugin but I'm kinda' lost. So I saw that with GetTexture I can retrieve the texture object, now I want to extract the data and convert it to base64 and viceversa...

    I'm new to WebGl so before going into the big chunk of documentation, is there anyone who can give advice? I think is simple, but I need to learn tons of stuff first...

    The main objective is be able to extract a sprite texture as a base64 string, and create a texture from a base64 string and inject that back to a Sprite.

  • This is really difficult and also will be really slow since readback from the GPU is slow and complicated, and base64 strings are inefficient. What are you trying to achieve? It would probably be better to find a different way to do it.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I'm trying to get the base64 string to send it to a server to be stored and used as an avatar later on. Then retrieve back from the server the custom image and use it as an avatar as well. For now is just for avatars, but if I'm able to use it this way, I may create items to "sell" on a server and then send them to the client to be use as in game items.

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