Table of Contents

Class OdfImageCompatibility

Namespace
OdfKit.Image
Assembly
OdfKit.dll

Provides practical image compatibility helpers for ODF documents. 提供 ODF 文件的實務影像相容性輔助工具。

public static class OdfImageCompatibility
Inheritance
OdfImageCompatibility
Inherited Members

Methods

IsPortableImageName(string?)

Gets whether the preferred image name uses a portable bitmap or vector format. 取得偏好影像檔名是否使用可攜點陣或向量格式。

public static bool IsPortableImageName(string? preferredName)

Parameters

preferredName string

The preferred image file name. / 偏好影像檔名。

Returns

bool

true if the name ends with PNG, JPG, JPEG or SVG. / 若檔名以 PNG、JPG、JPEG 或 SVG 結尾則為 true

NormalizeRequest(string?)

Normalizes a preferred image file name to a portable default when no extension is present. 當偏好影像檔名沒有副檔名時,將其正規化為可攜預設檔名。

public static string NormalizeRequest(string? preferredName)

Parameters

preferredName string

The preferred image file name. / 偏好影像檔名。

Returns

string

The normalized image file name. / 正規化後的影像檔名。

NormalizeRequest(string?, string?)

Builds a practical compatibility recommendation for an image request. 為影像要求建立實務相容性建議。

public static OdfImageNormalizationRequest NormalizeRequest(string? preferredName, string? mediaType)

Parameters

preferredName string

The preferred image file name. / 偏好影像檔名。

mediaType string

The detected media type. / 偵測到的媒體類型。

Returns

OdfImageNormalizationRequest

The normalization recommendation. / 正規化建議。