How to

get image from clipboard

Published: 8. January 2009 | Updated: 26. September 2014
License: Microsoft Public License (MS-PL)
Categories: Windows
Tags: C# GDI Windows Winforms WPF
Was this snippet helpful for you? YESYES / NONO
Get Analyzant!

Check your entire website from code to content in minutes with Analyzant, the free analysis suite.

Free download at analyzant.com

WPF

using System.Windows;

BitmapSource img = null;
if (Clipboard.ContainsImage())
{
    img = Clipboard.GetImage();
}

WinForms

using System.Windows.Forms;

Image img = null;
if (Clipboard.ContainsImage())
{
    img = Clipboard.GetImage();
}
Send us feedback about this snippet »



Related Snippets: