beta
cables is under heavy development.
There might be one or another bug, please let us know about it!

TextureToBase64 Op

Ops.Gl.Textures.TextureToBase64


TextureToBase64
Related ops:Base64ToTexture  
Namespace: Ops.Gl.Textures

Op author: mickey

Converts a texture into a base-64 image string


This can be handy if you want to send a texture as an image over an AJAXRequest. Keep in mind that this is a very slow operation, so be careful with performance.

Also note that there is an OP doing the opposite called Base64ToTexture.



Inputs

Texture (Object)

Input texture to be converted

Trigger (Trigger)

Trigger to do the conversion, put this behind a TriggerLimiter or TriggerOnce

Use JPEG (boolean /Number)

Default is a PNG lossless image, this toggle asks explicitly for a JPEG

Output dataUrl (boolean /Number)

Choose whether to export a string that is only a Base64, or already as a DataUrl

Outputs

Base64 string (String)

The string conversion of the texture

Loading (Number)

Gives you the status of the conversion and whether it has finished

Caught a mistake or want to contribute to the documentation?

Edit Documentation 

working with base64 images

Open Example In Editor

Patches using TextureToBase64