Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OfficeImageOrientationNormalizer

Namespace OfficeIMO.Drawing
Assembly OfficeIMO.Core
Modifiers static

Reads and normalizes embedded JPEG EXIF and classic-TIFF orientation without platform imaging dependencies.

Inheritance

  • Object
  • OfficeImageOrientationNormalizer

Methods

TryNormalizeToPng 2 overloads
public static Boolean TryNormalizeToPng(Byte[] imageBytes, out Byte[] normalizedPng, out OfficeImageInfo normalizedInfo) #
Returns: Boolean

Converts an explicitly rotated or mirrored JPEG/TIFF source to orientation-neutral PNG bytes. Returns false when orientation is absent/default or the managed decoder cannot normalize the payload.

Parameters

imageBytes System.Byte[] requiredposition: 0
normalizedPng System.Byte[]@ requiredposition: 1
normalizedInfo OfficeIMO.Drawing.OfficeImageInfo@ requiredposition: 2
public static Boolean TryNormalizeToPng(Byte[] imageBytes, Boolean applyEmbeddedOrientation, out Byte[] normalizedPng, out OfficeImageInfo normalizedInfo) #
Returns: Boolean

Converts an explicitly oriented JPEG/TIFF source to PNG while either applying or ignoring its metadata. This supports static renderers that implement CSS image-orientation consistently across outputs.

Parameters

imageBytes System.Byte[] requiredposition: 0
applyEmbeddedOrientation System.Boolean requiredposition: 1
normalizedPng System.Byte[]@ requiredposition: 2
normalizedInfo OfficeIMO.Drawing.OfficeImageInfo@ requiredposition: 3
public static Boolean TryRead(Byte[] imageBytes, out OfficeImageOrientation orientation) #
Returns: Boolean

Attempts to read an explicit non-default or default orientation from JPEG EXIF or classic TIFF bytes.

Parameters

imageBytes System.Byte[] requiredposition: 0
orientation OfficeIMO.Drawing.OfficeImageOrientation@ requiredposition: 1