# Class ClipboardImage | EchoHub Documentation
Reads raw image data from the OS clipboard (e.g. an image copied from a browser, or a Win+Shift+S screenshot), which terminals cannot paste as text. Always returns PNG bytes: clipboard PNG data is passed through, clipboard bitmaps (CF_DIB) are re-encoded.

# Class ClipboardImage

Namespace
  EchoHub.Client.Services

Assembly
  EchoHub.Client.dll

Reads raw image data from the OS clipboard (e.g. an image copied from a browser, or a Win+Shift+S screenshot), which terminals cannot paste as text. Always returns PNG bytes: clipboard PNG data is passed through, clipboard bitmaps (CF_DIB) are re-encoded.

    public static class ClipboardImage

Inheritance
  object
  ClipboardImage

Inherited Members
  object.GetType()
  object.MemberwiseClone()
  object.ToString()
  object.Equals(object)
  object.Equals(object, object)
  object.ReferenceEquals(object, object)
  object.GetHashCode()

## Methods

### DibToPng(byte[])

Converts clipboard DIB bytes (a BITMAPINFOHEADER/V4/V5 + optional palette/masks + pixel data, i.e. a .bmp file without its 14-byte file header) to PNG. Returns null when the data is malformed or not decodable as a bitmap.

    public static byte[]? DibToPng(byte[] dib)

#### Parameters

`dib` byte[]

#### Returns

byte[]

### TryGetPng(out byte[])

    public static bool TryGetPng(out byte[] png)

#### Parameters

`png` byte[]

#### Returns

bool