bradmartin / nativescript-gif

NativeScript plugin to use native gifs
Other
50 stars 18 forks source link

load from data or base64 #38

Open aldoabazi opened 4 years ago

aldoabazi commented 4 years ago

hey, thank you for this plugin.

I want to display a gif that i receive from server in byte array. Image asset lets you load images from byte array or base64 string. Is it possible to load from that data and display it(like i do with png or jpg).?

getting data:

gifSrc: ImageSource;

this.gifSrc = new ImageSource();
this.gifSrc.fromData(res.photo_data.data);

display:

<Gif src="{{ gifSrc }}" class="action-image" ></Gif>

I am getting an error, is there any solution to this?