I want to display a QR Code picture back to the client.
Here is my code in RootDialog,
[LuisIntent("None")]
[LuisIntent("")]
public async Task None(IDialogContext context, LuisResult result)
{
string qrText = "Photo";
QRCodeEncoder enc = new QRCodeEncoder();
Bitmap qrcode = enc.Encode(qrText);
var message = context.MakeMessage();
Attachment attachment = new Attachment();
attachment.ContentType = "image/jpg";
attachment.Content = qrcode as Image; // This line is not sure...
attachment.Name = "Image";
message.Attachments.Add(attachment);
await context.PostAsync(message);
}
I'm not really sure how to reply an image object as an attachment though..
Thank you very much!