Skip to content

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 the data size of the validated image.
Height { get; } Gets the height of the validated image.
MaxDataSize { get; set; } Gets or sets the maximum file size allowed.
MaxHeight { get; set; } Gets or sets the maximum height allowed. 0 means any height.
MaxWidth { get; set; } Gets or sets the maximum width allowed. 0 means any width.
Milliseconds { get; } Gets the time passed during validating the image.
MinHeight { get; set; } Gets or sets the minimum height allowed. 0 means any height.
MinWidth { get; set; } Gets or sets the minimum width allowed. 0 means any width.
Width { get; } Gets the 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