CKFinder 3 – ASP.NET Connector Documentation
ImageFormats Class Reference

Known image formats. More...

Static Public Member Functions

static void RegisterFormat< T > ()
 Registers a new image format. More...
 
static void RegisterFormat (Type type)
 Registers a new image format. More...
 
static ISupportedImageFormat GetFormatForFile (IFile file)
 Gets format for a file. More...
 
static ISupportedImageFormat GetResizedFormatForFile (IFile file)
 Gets format for a file after resize. More...
 

Static Public Attributes

static readonly IEnumerable< string > KnownExtensions = KnownFormats.SelectMany(x => x.FileExtensions).Distinct().Select(x => "." + x)
 A list of known image extensions. More...
 

Detailed Description

Known image formats.

Member Function Documentation

◆ GetFormatForFile()

static ISupportedImageFormat GetFormatForFile ( IFile  file)
inlinestatic

Gets format for a file.

Parameters
fileA file.
Returns
A ISupportedImageFormat instance or null if file extension in not in KnownExtensions list.

◆ GetResizedFormatForFile()

static ISupportedImageFormat GetResizedFormatForFile ( IFile  file)
inlinestatic

Gets format for a file after resize.

For Bitmap and unknown file formats returns an instance of JpegFormat.

Parameters
fileA file.
Returns
A ISupportedImageFormat instance.

◆ RegisterFormat()

static void RegisterFormat ( Type  type)
inlinestatic

Registers a new image format.

Parameters
typeA type of image format. Must implement ISupportedImageFormat.

◆ RegisterFormat< T >()

static void RegisterFormat< T > ( )
inlinestatic

Registers a new image format.

Template Parameters
TA type of image format. Must implement ISupportedImageFormat.
Type Constraints
T :ISupportedImageFormat 

Member Data Documentation

◆ KnownExtensions

readonly IEnumerable<string> KnownExtensions = KnownFormats.SelectMany(x => x.FileExtensions).Distinct().Select(x => "." + x)
static

A list of known image extensions.


The documentation for this class was generated from the following file: