# OfficeImagePngConverter

Shared dependency-free conversion helpers for raster formats supported by OfficeIMO.Drawing.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficeImagePngConverter.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeImagePngConverter.cs#L7)

**Modifiers**

static

Shared dependency-free conversion helpers for raster formats supported by OfficeIMO.Drawing.

## Inheritance

- object
- OfficeImagePngConverter

Filter members 

Show inherited

## Methods

`public static bool TryConvertDibToPng(byte[]? dibBytes, out byte[] pngBytes)` [#](#method-tryconvertdibtopng-byte-byte)

[OfficeImagePngConverter.cs:100](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeImagePngConverter.cs#L100)

Attempts to convert an RTF-style raw DIB payload to PNG bytes.

Parameters

**dibBytes byte[]? required**

**pngBytes byte[] required**

Returns

`bool`

TryConvertToPng 2 overloads

`public static bool TryConvertToPng(byte[]? imageBytes, out byte[] pngBytes)` [#](#method-tryconverttopng-byte-byte)

[OfficeImagePngConverter.cs:7](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeImagePngConverter.cs#L7)

Attempts to convert a Drawing-supported raster payload to PNG bytes.

Parameters

**imageBytes byte[]? required**

**pngBytes byte[] required**

Returns

`bool`

`public static bool TryConvertToPng(byte[]? imageBytes, OfficeRasterDecodeOptions? options, out byte[] pngBytes, out OfficeRasterDecodeInfo decodeInfo)` [#](#method-tryconverttopng-byte-officeimo-drawing-officerasterdecodeoptions-byte-officeimo-drawing-officerasterdecodeinfo)

[OfficeImagePngConverter.cs:12](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Raster/OfficeImagePngConverter.cs#L12)

Attempts to convert a selected static raster frame to PNG with typed loss evidence.

Parameters

**imageBytes byte[]? required**

**options OfficeIMO.Drawing.OfficeRasterDecodeOptions? required**

**pngBytes byte[] required**

**decodeInfo OfficeIMO.Drawing.OfficeRasterDecodeInfo required**

Returns

`bool`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:23134BBE6F8DCDF1B41F1C01EC27365A21C8CFEB29EA432DF208D70A5DE196C7 -->
