Image Resizer : API Documentation

Type SizeLimits

Namespace ImageResizer.Plugins.Basic

Parent IssueSink

Enforces two kinds of maximum size constraints: a Total size limit, and an Image size limit. Image limits do not include padding, border, or effect widths, and automatically shrink the 'width/height/maxwidth/maxheight' values to fit within the limits. Total limits are absolute and apply to the actual result dimensions, causing an exception if they are exceeded. Limits are checked during the layout phase, prior to resource-intensive bitmap operations.

Methods

Properties

Public instance methods

bool FitsInsideTotalSize(Size s)

void ValidateTotalSize(Size total)

Public properties

bool HasImageSize get;

Returns true if ImageSize is specified.

Size ImageSize get; set;

The maximum size an un-rotated image can be drawn when creating a resized image. Rotation will increase the total size, as will any borders, paddings, margins, or effects. Not effective at preventing attacks, use totalSize. If larger values are specified in a querystring, they will automatically be scaled to fit within these dimensions. Defaults to 0x0, which means no limits

TotalSizeBehavior TotalBehavior get; set;

What action to take when the total size of the final image would exceed the TotalSize value. Defaults to ThowException

Size TotalSize get; set;

The maximum final size an image generated by ImageBuilder can be. Defaults to 3200x3200