Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OfficeDocumentImageDimensions

OfficeIMO.Reader

Namespace
OfficeIMO.Reader
Assembly
OfficeIMO.Reader.Core
Source revision
12511d2fa560 with working tree changes
Modifiers
static

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

Inheritance

  • object
  • OfficeDocumentImageDimensions

Methods

public static bool TryReadPixelDimensions(byte[] payload, string? mediaType, out int width, out int height) #

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