ImageOrPrintOptions.SetDesiredSize

SetDesiredSize(int, int)

Sets desired width and height of image.

[Obsolete("Use SetDesiredSize(int, int, bool) by setting param keepAspectRatio to false instead.")]
public void SetDesiredSize(int desiredWidth, int desiredHeight)
ParameterTypeDescription
desiredWidthInt32desired width in pixels
desiredHeightInt32desired height in pixels

Remarks

NOTE: This member is now obsolete. Instead, please use SetDesiredSize by setting param keepAspectRatio to false. This property will be removed 12 months later since May 2023. Aspose apologizes for any inconvenience you may have experienced.

See Also


SetDesiredSize(int, int, bool)

Sets desired width and height of image.

public void SetDesiredSize(int desiredWidth, int desiredHeight, bool keepAspectRatio)
ParameterTypeDescription
desiredWidthInt32desired width in pixels
desiredHeightInt32desired height in pixels
keepAspectRatioBooleanwhether to keep aspect ratio of origin image

Remarks

The width and height of the output image in pixels will be only based on the set desired width and height.

The HorizontalResolution and VerticalResolution will not effect the width and height of the output image in this case.

See Also