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: 11.0.0.0.0.297 (.NET 4.5.2, x86)
Syntax
double GetBestScale(
	Stream stream,
	int frameIndex,
	double requestedScale
)

Parameters

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

Return Value

Type: Double
The closest stored scale greater than or equal to the requested scale.
Remarks
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