using (var img = Clipboard.GetImage()) { using (var stream = new MemoryStream()) { img.Save(stream, System.Drawing.Imaging.ImageFormat.Jpeg); return stream.ToArray(); }; };
Hi afrozeameera,
Clipboard class is in windows Forms namespace.
So add reference of System.Windows.Forms namespace and import in the page.
using System.Windows.Forms