Converter.ThumbnailSizeLimit Property HTML5/Flash Uploader ASP.NET

Supported technologies: HTML 5

Gets or sets a max file size for a thumbnail generated by uploader.

Namespace: Aurigma.ImageUploaderFlash
Assembly: Aurigma.ImageUploaderFlash (in Aurigma.ImageUploaderFlash.dll)

Syntax

C#
public int ThumbnailSizeLimit { get; set; }

Property Value

Type: System..Int32

A max file size (in bytes) generated by the uploader. If 0 is specified, the uploader does not try to optimize size. It just uses ThumbnailJpegQuality without trying to pick an optimal value.

Default value is 0.

Remarks

This property makes sense only if the Mode property is Thumbnail and the converter tries to create JPEG (or ThumbnailType is auto). It works in the following way:

  1. If the ThumbnailType is auto, it tries to create PNG. If this PNG is smaller than the specified limit, a converter returns the PNG file. Otherwise, it tries to create JPEG as explained further.
  2. It tries to create a JPEG file with the max possible quality. If it is too large, it tries smaller value, unless it picks a JPEG quality which produces the desired result.
  3. The minimum possible JPEG quality it tries is the value specified by the ThumbnailJpegQuality. If the file size is still too large, the algorithm stops there and uploads the image created with this quality.

It is important to pick realistic values for the combination of the JPEG quality, size limit and thumbnail dimensions.

See Also

Reference

Manual