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.
More...
|
enum | TotalSizeBehavior { ThrowException,
IgnoreLimits
} |
|
|
| SizeLimits (Config c) |
|
void | ValidateTotalSize (Size total) |
|
bool | FitsInsideTotalSize (Size s) |
|
| IssueSink (string defaultSource) |
|
virtual IEnumerable< IIssue > | GetIssues () |
| Returns a copy of the list of reported issues. More...
|
|
virtual void | AcceptIssue (IIssue i) |
| Adds the specified issue to the list unless it is an exact duplicate of another instance. More...
|
|
|
Size | totalSize = new Size(3200,3200) |
|
TotalSizeBehavior | totalBehavior = TotalSizeBehavior.ThrowException |
|
Size | imageSize = new Size(0,0) |
|
string | defaultSource = null |
|
|
Size | TotalSize [get, set] |
| The maximum final size an image generated by ImageBuilder can be. Defaults to 3200x3200 More...
|
|
TotalSizeBehavior | TotalBehavior [get, set] |
| What action to take when the total size of the final image would exceed the TotalSize value. Defaults to ThowException More...
|
|
bool | HasImageSize [get] |
| Returns true if ImageSize is specified. More...
|
|
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 More...
|
|
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.
Definition at line 18 of file SizeLimits.cs.
bool ImageResizer.Plugins.Basic.SizeLimits.HasImageSize |
|
get |
Returns true if ImageSize is specified.
Definition at line 81 of file SizeLimits.cs.
Size ImageResizer.Plugins.Basic.SizeLimits.ImageSize |
|
getset |
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
Definition at line 92 of file SizeLimits.cs.
TotalSizeBehavior ImageResizer.Plugins.Basic.SizeLimits.TotalBehavior |
|
getset |
What action to take when the total size of the final image would exceed the TotalSize value. Defaults to ThowException
Definition at line 73 of file SizeLimits.cs.
Size ImageResizer.Plugins.Basic.SizeLimits.TotalSize |
|
getset |
The documentation for this class was generated from the following file:
- C:/Users/nathanael/Documents/resizer/Core/Plugins/Basic/SizeLimits.cs