Loading images from stream/bitmap (not via url)

2 posts, 0 answers
  1. Yngve
    Yngve avatar
    19 posts
    Member since:
    Feb 2017

    Posted 21 Apr 2017 Link to this post

    Hi,

     

    I was wondering if there's an option to load images in a Kendo Diagram without the use of referencing a URL, as is done here:

    g.append(new dataviz.diagram.Image({
                source: "../content/dataviz/diagram/people/" + dataItem.image,
                x: 3,
                y: 3,
                width: 68,
                height: 68
              }));

     

    Is it possible to load it via a bitmap or stream and pass it from the controller onto the view?

     

     

     

     

    d

  2. Tsvetina
    Admin
    Tsvetina avatar
    2189 posts

    Posted 25 Apr 2017 Link to this post

    Hi Yngve,

    The Image source can also be a data URI containing a base64-encoded image:
    http://dojo.telerik.com/@tsveti/ilAKiP/2

    So, if you have the image on the server as a byte array, you could convert it to base64 format and return it to the view to use in the Diagram.

    Regards,
    Tsvetina
    Telerik by Progress
    Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top