3

I have a byte array from the uploaded pic by the user . I need to render this byte array as an image on Skype and other channels using Bot-framework

1 Answers1

5

Images can be sent as base64 encoded:

        byte[] imagedata = {your image}
        var image64 = "data:image/jpeg;base64," + Convert.ToBase64String(imagedata);

        reply.Attachments.Add(new Attachment()
        {
            ContentUrl = image64,
            ContentType = "image/jpeg",
        });
Lars
  • 9,976
  • 4
  • 34
  • 40