# OfficePngReader

Dependency-free PNG decoder for supported PNG images.

Class 

`OfficeIMO.Drawing`

**Namespace**

`OfficeIMO.Drawing`

**Assembly**

`OfficeIMO.Core`

**Source revision**

`ba882f6b0d07` with working tree changes

**Source**

[OfficePngReader.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Png/OfficePngReader.cs#L17)

**Modifiers**

static

Dependency-free PNG decoder for supported PNG images.

## Inheritance

- object
- OfficePngReader

Filter members 

Show inherited

## Methods

`public static bool TryDecode(byte[] bytes, out OfficeRasterImage? image)` [#](#method-trydecode-byte-officeimo-drawing-officerasterimage)

[OfficePngReader.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Png/OfficePngReader.cs#L39)

Attempts to decode a PNG image into an RGBA raster buffer.

Parameters

**bytes byte[] required**

**image OfficeIMO.Drawing.OfficeRasterImage? required**

Returns

`bool`

`public static bool TryGetFrameCount(byte[]? bytes, out int frameCount)` [#](#method-trygetframecount-byte-int32)

[OfficePngReader.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/ba882f6b0d07acddd884b5e7d3086b0cfff0a05a/OfficeIMO.Core/Png/OfficePngReader.cs#L17)

Inspects a PNG container without decoding pixels and reports its declared APNG frame count. Static PNG files report one frame.

Parameters

**bytes byte[]? required**

**frameCount int 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:F4566543A93BF321C79CE059F666543AEFCCB965025809A679EB41253C508A59 -->
