C# Класс Serenity.Web.ImageChecker

checks stream data if valid image file and validate required conditions.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
CheckSizeConstraints ( int width, int height ) : ImageCheckResult

Checks an image width and height against size constraints

CheckStream ( Stream inputStream ) : ImageCheckResult

Use this overload to check an image from a stream.

CheckStream ( Stream inputStream, bool returnImage, Image &image ) : ImageCheckResult

Checks if the given image if it is a valid or not. If so, controls its compliance to constraints

FormatErrorMessage ( ImageCheckResult result ) : string

Описание методов

CheckSizeConstraints() публичный Метод

Checks an image width and height against size constraints
public CheckSizeConstraints ( int width, int height ) : ImageCheckResult
width int /// Image width.
height int /// Image height.
Результат ImageCheckResult

CheckStream() публичный Метод

Use this overload to check an image from a stream.
public CheckStream ( Stream inputStream ) : ImageCheckResult
inputStream Stream /// Stream with image data
Результат ImageCheckResult

CheckStream() публичный Метод

Checks if the given image if it is a valid or not. If so, controls its compliance to constraints
public CheckStream ( Stream inputStream, bool returnImage, Image &image ) : ImageCheckResult
inputStream Stream /// Stream which contains image data
returnImage bool /// Does image required to be returned? If not requested, it will be disposed at the end of processing
image Image /// When method returns contains the image object. If returnImage false it will contain null
Результат ImageCheckResult

FormatErrorMessage() публичный Метод

public FormatErrorMessage ( ImageCheckResult result ) : string
result ImageCheckResult
Результат string