Base64decode from Ajax Request

Hello,

I am trying to get an image from runwayml : https://runwayml.com/
to create some basic examples patch on how to connect runway and cables together.

I started a patch here : https://cables.gl/edit/5e81c1cb193f7c05d380a10c

This basically the depth of focus example from the byte size tutorials (which are awesome btw). I want to get a depthTexture from runway by running the denseDepth model (which is able to create a depth map from a monocular webcam) and sending the result over http.

I do the ajax request right, because I get some results. The parsing also seems alright, but I cannot get an image texture out of the base64decode op, and I don’t really get why. Can somebody point me in the right direction ? or a way to troubleshoot this ?

Thanks !

Hi b2renger,

Super interesting post. I was not aware of runwayml. It looks awesome and could make cables an even more broad tool if it is connected. I don’t have an answer for you but was just excited to hear about it. The cable patch is private by the way so could not check it out. Keeping a close eye on this thread :slight_smile:

gr! Szann

@szann thanks for your answer.

I made the patch public so you can look it up.

The output of [stringNew2Old] is this base64 string :

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAlgAAAGQCAAAAABXXkFEAAAsZUlEQVR4nO1d7Zq1qg1NnGl7M73/i+sZWf0BKigf4Utxb1afnne2IiCGJIQk8H8JZMAkQ7Kct0DoKUmr0p51qiH4sOdGzWuGChV0HukiGc9m1Mbmv0tFByYmgvi1/oZwaiA1h0CeEt6LkevnMnVcJzbnkvUGu+i5ERocqwPh9gJfIOv1a3hV/fO8VfLr1COplL0FvXSUNerpcUsSdCGclwm1gNB9iKdQsqr4s6GPw5F7LZBV9/6Npiic6AIjCsVUyZ6inimzTTq4P6lYqnVhVT6kRuIqrTzyi5NcMGt9ky6SNTyxVxQRQuBjO5gca6ILftNFkvBMWek64I0QKFU4//Rom54ButZ8LXKtKhs+qZOD89Pet80lrE+mGCnajEF5LfXtZ5CWoOAUhRP3oQ1hIUHXqfsTd6OG54menRxrogvylfepZUlwGSXRsL1xbAM9brEqnHghapeGWy0hTFE40QXdONYbufqEDCzYP5kca6ILxtGxvo/Flb5xo3HyaFkZW8Yp5BOW8LUaU8ktZBfzZ0k/+755kVbgyxX8KQonumAcUfgw4P6dcpHtxZ5uZnwWz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H3WKwokuuBJWo9iO1+MDcqN4X6EuDEH7K8Bbu3NhcqwvxB1T5vc7tY1vfOcNrn6Unxvo5LgcwAN2LKIx1PdSvJ4oGzgCbMR5+o7WzykKJ7rAx7GGMcc8iOdGoEXLCZ7UMvzg1NTOsybH+kr0nzcP6Vjv1rLC6M7shQ2cedKFr+z3y7+DdWS9B48R1oQXrehSEKSlkU1WM2D1u/G0mtySY32ibLsZ7chhk5mxpMflCWjSmBxrogt+G4VB9hLVTyGiJMf155FsNekExXWGh3zLe97oFPRscLL6GEhyX5fvSnse4+2fKQonuuCXtozgnTj4mLzJWGCSRfxl4k9bb5w9puJ+ZdQHctQd87xO1yFxgveV4fM9du/yIQr5+RXqxAfhlzcZOyZr6YltOqfK+EvZWe7iTwsKZtecX9Hxg48/9iB6p4Td7RMruv7p0g1vF36333AH+kxmjblZPyrOjtmSPM2R+7F7oaZknbSEVh38xBGUeCH55q/P295U3ic64f/ZMDxqaKSAlQAAAABJRU5ErkJggg==

And I get an error

onvaluechanged exception cought DOMException: "String contains an invalid character"

Hum I probably misread the documentation, and maybe I should use another object for this purpose.

The string I provided above does decode alright with online decoders.

Is the [base64Decode] only for strings or numbers ?

hey,

your string actually is a “data uri” that goes well into the “src” of an image-tag. so this
code might work as a userop for now (does for me, given your data):

// inputs
const dataIn = op.inStringEditor("data URI","");

// outputs
const textureOut = op.outTexture("Texture");

dataIn.onChange = () => {
    var image = new Image();
    image.onload=function(e)
    {
        var tex=CGL.Texture.createFromImage(op.patch.cgl,image,{});
        textureOut.set(tex);
    };
    image.src = dataIn.get();
}

just paste your data into the string editor, and receive the image as a texture-out.

hope that helps!

greetings,
stephan/steam

1 Like

@stephan thanks that is perfect !

I had began to try the user op way with the js Image, but I was definitely far from getting the texture the right.

Thank you very much again.

@stephan, @szann

FYI I uploaded a new patch with another custom op to make httpRequest at custom time intervals, here is the link : https://cables.gl/edit/YggTG4

I works pretty nicely with live runway :slight_smile: Thanks