ImageChecker class

namespace: Serenity.Web   assemblySerenity.Net.Services

Checks stream data if valid image file and validate required conditions.

public class ImageChecker

Public Members

name description
ImageChecker() The default constructor.
DataSize { get; } Gets data size of the validated image
Height { get; } Gets height of the validate image
MaxDataSize { get; set; } Gets/sets maximum file size allowed
MaxHeight { get; set; } Gets/sets maximum height allowed. 0 means any height.
MaxWidth { get; set; } Gets/sets maximum width allowed. 0 means any width.
Milliseconds { get; } Gets the time passed during validating the image
MinHeight { get; set; } Gets/sets minimum height allowed. 0 means any height.
MinWidth { get; set; } Gets/sets minimum width allowed. 0 means any width.
Width { get; } Gets width of the validated image
CheckSizeConstraints(…) Checks an image width and height against size constraints
CheckStream(…) Checks if the given image if it is a valid or not. If so, controls its compliance to constraints
FormatErrorMessage(…) Formats an ImageCheckResult error message

See Also