mindee-api-dotnet

ImageUtils.CalculateNewDimensions Method

Declaring Type: ImageUtils
Namespace: Mindee.Image
Assembly: Mindee
Assembly Version: 3.21.0+995c229708fe61b0dacbe0bfca8ad9e39db87623

Computes the new dimensions for a given SKBitmap, and returns a scaled down version of it relative to the provided bounds.

public static ValueTuple<int, int> CalculateNewDimensions(SKBitmap original, int? maxWidth = null, int? maxHeight = null);

Parameters

original SKBitmap

Input SKBitmap.

maxWidth Nullable<int>

Optional max width.

maxHeight Nullable<int>

Optional max height.

Returns

ValueTuple<int, int>

The scaled down dimensions for the SKBitmap.

Exceptions

MindeeInputException

Throws if the bitmap is null.


Documentation generated by MdDocs