Closed shdehnavi closed 7 years ago
It depends of file location. You can read it with File.OpenRead
or use MemoryStream
as a source - there are a lot of choices. You should provide Stream
to read file from.
About your sample - you forgot to add error text you receive,. BTW I think you should rewind mms
back to start with mms.Position = 0
after bmp.Save
mms.Position = 0
solved , thanq
hi
i want to send bitmap variable type as a photo by NetTelegramBotApi:
Bitmap bmp;
using (var photoData = Assembly.GetExecutingAssembly().GetManifestResourceStream("InstagramPuzzleBot.Resources.sample.png"))
i want to send bitmap contents, what should i write instead of : Assembly.GetExecutingAssembly().GetManifestResourceStream("NetTelegramBotApi.t_logo.png ?i used this bug i got error: