Click or drag to resize

IScaledDecoderGetBestScale Method

If the codec can efficiently generate a scaled image without actually resampling, this will return the closest scale given an input scale factor.

Namespace:  Atalasoft.Imaging.Codec
Assembly:  Atalasoft.dotImage (in Atalasoft.dotImage.dll) Version: (.NET 4.5.2, x86)
double GetBestScale(
	Stream stream,
	int frameIndex,
	double requestedScale


Type: System.IOStream
The encoded image stream
Type: SystemInt32
The zero based frame index if the source image is multiframed
Type: SystemDouble
The scale to request

Return Value

Type: Double
The closest stored scale greater than or equal to the requested scale.
This is most useful for images that have multiple resolutions stored within. JPEG's can quickly generate a scaled image 1/2, 1/4, 1/8, and 1/16 the original size and thus will return one of these sizes.
See Also