wsick / Fayde

Inspired by Silverlight; XAML engine using Javascript and rendering to the HTML5 Canvas.
MIT License
189 stars 27 forks source link

How to show bytes data as a source for Image in fayde? #168

Closed deepaksm1 closed 9 years ago

deepaksm1 commented 9 years ago

How to show bytes data as a source for Image in fayde?

BSick7 commented 9 years ago

What data structure is the data in the browser?

BSick7 commented 9 years ago

In Fayde v0.16.53, BitmapImage.SetSource has been implemented.

In addition, Image.Source and ImageBrush.ImageSource will coerce ArrayBuffer into a BitmapImage by utilizing SetSource.

A raw example is seen in the testsite.

View: https://github.com/wsick/Fayde/blob/master/testsite/Media/image-setsource.fap

ViewModel: https://github.com/wsick/Fayde/blob/master/testsite/Media/ImageSetSourceViewModel.ts