Copies the RGB or raster image data from a specified image to the Windows clipboard.
public static void Copy(
IWin32Window owner,
RasterImage image,
RasterClipboardCopyFlags flags
)
public:
static void Copy(
IWin32Window^ owner,
RasterImage^ image,
RasterClipboardCopyFlags flags
)
public:
static void Copy(
IWin32Window^ owner,
RasterImage^ image,
RasterClipboardCopyFlags^ flags
)
owner
Handle to the active window.
image
The image to be copied.
flags
Indicates how image data is placed on the clipboard.
The clipboard will contain the same Leadtools.RasterImage.Width, Leadtools.RasterImage.Height, Leadtools.RasterImage.BitsPerPixel, and color Leadtools.RasterImage.Order as the image.
This example loads a bitmap using clipboard data, if available
using Leadtools.WinForms;
using Leadtools;
using Leadtools.Codecs;
public void RasterClipboard_Copy(RasterImageViewer viewer)
{
RasterCodecs codec = new RasterCodecs();
// Load a bitmap, keeping its own bits per pixel
RasterImage image = codec.Load(Path.Combine(LEAD_VARS.ImagesDir, "Image1.cmp"));
// Copy the bitmap to the clipboard
RasterClipboard.Copy(viewer, image, RasterClipboardCopyFlags.Empty | RasterClipboardCopyFlags.Dib);
// Dispose the original bitmap, leaving the copy in the clipboard
image.Dispose();
MessageBox.Show("Image copied to clipboard");
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS22\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document