Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to display binary images (data URIs) in the dxGallery widget or a dxList template

$
0
0

To display binary images in the dxGallery widget or a dxList item template, encode your image byte array in base64 and use the Data URI scheme. In this case, all the processing will be done on the client side and your image elements inside the dxList template will look as follows:

[HTML]
<imgdata-bind="attr: { src: 'data:image/png;base64,' + your_image_bytes_in_base_64}"/>

You can use the following tools to convert any image into a base64 string:

DevExpress - How to convert a binary image to a base64 string
Motobit
DataURL


Viewing all articles
Browse latest Browse all 7205

Trending Articles