# OfficeDocumentImageDimensions

Reads pixel dimensions from common encoded image formats without decoding pixels.

Class 

`OfficeIMO.Reader`

**Namespace**

`OfficeIMO.Reader`

**Assembly**

`OfficeIMO.Reader.Core`

**Source revision**

`12511d2fa560` with working tree changes

**Source**

[OfficeDocumentImageDimensions.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Reader.Core/OfficeDocumentImageDimensions.cs#L11)

**Modifiers**

static

Reads pixel dimensions from common encoded image formats without decoding pixels.

## Inheritance

- object
- OfficeDocumentImageDimensions

Filter members 

Show inherited

## Methods

`public static bool TryReadPixelDimensions(byte[] payload, string? mediaType, out int width, out int height)` [#](#method-tryreadpixeldimensions-byte-string-int32-int32)

[OfficeDocumentImageDimensions.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/12511d2fa560784a40564a2dc62102d2005ed547/OfficeIMO.Reader.Core/OfficeDocumentImageDimensions.cs#L11)

Attempts to read encoded image dimensions from PNG, JPEG, GIF, or BMP bytes.

Parameters

**payload byte[] required**

**mediaType string? required**

**width int required**

**height 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:37902B86D91F452C3F361B1310FC60FC7E943E02C97F07728BB16CB60CFD14A9 -->
