FingerImage.downscaleTo Method¶
Module: FingerImage
Definition¶
Downscales the image so that its maximum dimension equals the given maximum size, while preserving the aspect ratio.
Note
If the maximum dimension is already smaller than the given maximum size, the function does nothing and the returned scale ratio is 1.
downscale_to(self, dst_finger_image: FingerImage, max_size: int) -> float
Parameters
dst_finger_image
FingerImagein Destination image.max_size
intin Maximum image size, in pixels. The value must be greater than 0.
Returns
float
The scaling ratio applied to the image. Range is ]0:1].
Exceptions
An error has occurred during Finger Library execution.
double downscaleTo(FingerImage dstFingerImage, int maxSize)
Parameters
dstFingerImage
FingerImagein Destination image.maxSize
intin Maximum image size, in pixels. The value must be greater than 0.
Returns
double
The scaling ratio applied to the image. Range is ]0:1].
Exceptions
An error has occurred during Finger Library execution.
public float DownscaleTo(FingerImage dstFingerImage, int maxSize)
Parameters
dstFingerImage
FingerImagein Destination image.maxSize
intin Maximum image size, in pixels. The value must be greater than 0.
Returns
float
The scaling ratio applied to the image. Range is ]0:1].
Exceptions
An error has occurred during Finger Library execution.
public float downscaleTo(FingerImage dstFingerImage, int maxSize) throws FingerException
Parameters
dstFingerImage
FingerImagein Destination image.maxSize
intin Maximum image size, in pixels. The value must be greater than 0.
Returns
float
The scaling ratio applied to the image. Range is ]0:1].
Exceptions
An error has occurred during Finger Library execution.
public func downscaleTo(dstFingerImage: FingerImage, maxSize: Int32) throws -> Float
Parameters
dstFingerImage
FingerImagein Destination image.maxSize
Int32in Maximum image size, in pixels. The value must be greater than 0.
Returns
Float
The scaling ratio applied to the image. Range is ]0:1].
Exceptions
An error has occurred during Finger Library execution.
int id3FingerImage_DownscaleTo (
ID3_FINGER_IMAGE hFingerImage,
ID3_FINGER_IMAGE hDstFingerImage,
int maxSize,
float * scaleRatio)
Parameters
hFingerImage
ID3_FINGER_IMAGEin Handle to the FingerImage object.hDstFingerImage
ID3_FINGER_IMAGEin Destination image.maxSize
intin Maximum image size, in pixels. The value must be greater than 0.scaleRatio
float *out The scaling ratio applied to the image. Range is ]0:1].
Returns