Method SetImage
- Namespace
- PaintDotNet.Clipboard
- Assembly
- PaintDotNet.Core.dll
SetImage(IClipboard, IBitmapSource)
Takes the bitmap and puts it onto the clipboard in a few standard formats. The clipboard is first emptied.
public static void SetImage(this IClipboard clipboard, IBitmapSource source)
Parameters
clipboard
IClipboardsource
IBitmapSource
Remarks
For each clipboard format the bitmap will be converted to a compatible pixel format if that clipboard format does not support the bitmap's pixel format. For example, if the bitmap is in the RGBA64 pixel format, copying as a PNG will not require conversion but copying as DIBv5 will convert to BGRA32. For DIBv5, bitmaps using RGB ordering will be converted to BGR.
SetImage(IClipboard, IBitmapSource, IColorContext?)
Takes the bitmap and puts it onto the clipboard in a few standard formats. The clipboard is first emptied.
This overload also allows including a color profile for the clipboard types that support it, such as PNG. For formats that do not support an embedded color profile, such as DIB/DIBv5, the image will not be converted to any particular color space and the color profile will not be included.
public static void SetImage(this IClipboard clipboard, IBitmapSource source, IColorContext? colorContext)
Parameters
clipboard
IClipboardsource
IBitmapSourcecolorContext
IColorContext
Remarks
For each clipboard format the bitmap will be converted to a compatible pixel format if that clipboard format does not support the bitmap's pixel format. For example, if the bitmap is in the RGBA64 pixel format, copying as a PNG will not require conversion but copying as DIBv5 will convert to BGRA32. For DIBv5, bitmaps using RGB ordering will be converted to BGR.
SetImage(IClipboard, Image)
Takes the bitmap and puts it onto the clipboard in a few standard formats. The clipboard is first emptied.
public static void SetImage(this IClipboard clipboard, Image image)
Parameters
clipboard
IClipboardimage
Image
Remarks
For each clipboard format the bitmap will be converted to a compatible pixel format if that clipboard format does not support the bitmap's pixel format. For example, if the bitmap is in the RGBA64 pixel format, copying as a PNG will not require conversion but copying as DIBv5 will convert to BGRA32. For DIBv5, bitmaps using RGB ordering will be converted to BGR.
SetImage(IClipboard, Bitmap)
Takes the bitmap and puts it onto the clipboard in a few standard formats. The clipboard is first emptied.
public static void SetImage(this IClipboard clipboard, Bitmap bitmap)
Parameters
clipboard
IClipboardbitmap
Bitmap
Remarks
For each clipboard format the bitmap will be converted to a compatible pixel format if that clipboard format does not support the bitmap's pixel format. For example, if the bitmap is in the RGBA64 pixel format, copying as a PNG will not require conversion but copying as DIBv5 will convert to BGRA32. For DIBv5, bitmaps using RGB ordering will be converted to BGR.
SetImage(IClipboard, ISurface<ColorBgra>)
Takes the bitmap and puts it onto the clipboard in a few standard formats. The clipboard is first emptied.
public static void SetImage(this IClipboard clipboard, ISurface<ColorBgra> surface)
Parameters
clipboard
IClipboardsurface
ISurface<ColorBgra>