Table of Contents

Enum ImageContentMode

Namespace
BitMiracle.Docotic.Pdf.Layout
Assembly
BitMiracle.Docotic.Pdf.Layout.dll

Specifies how to draw an image in a container.

public enum ImageContentMode

Fields

Fill = 3

Resize an image to available size without preserving an aspect ratio.

FitArea = 0

Fit an image into available size while preserving an aspect ratio.

An image will be upscaled if an available width and height are both greater than the image size.

FitHeight = 2

Use all available height while preserving an image aspect ratio.

An image will be upscaled when the available height is greater than the image height.

This mode might lead to LayoutException if the width of the upscaled image is greater than the available width.

FitWidth = 1

Use all available width while preserving an image aspect ratio.

An image will be upscaled when the available width is greater than the image width.

Remarks

Image(Image, ImageContentMode) method accepts a parameter of this type. The content mode parameter affects how the method will transform the image and which part of the image will be visible inside the container.