I\'m using the Microsoft Bot Framework with Cognitive Services to generate images from a source image that the user uploads via the bot. I\'m using C#.
The Cognitive
You should be able to use something like this:
var message = activity.CreateReply("");
message.Type = "message";
message.Attachments = new List();
var webClient = new WebClient();
byte[] imageBytes = webClient.DownloadData("https://placeholdit.imgix.net/~text?txtsize=35&txt=image-data&w=120&h=120");
string url = "data:image/png;base64," + Convert.ToBase64String(imageBytes)
message.Attachments.Add(new Attachment { ContentUrl = url, ContentType = "image/png" });
await _client.Conversations.ReplyToActivityAsync(message);