Table of Contents

Method Scale

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Scale(int, int, GenericImageResizeQuality)

Returns a scaled version of the image. This is also useful for scaling bitmaps in general as the only other way to scale bitmaps is to blit a MemoryDC into another MemoryDC.

public virtual GenericImage Scale(int width, int height, GenericImageResizeQuality quality = GenericImageResizeQuality.Nearest)

Parameters

width int

New width.

height int

New height.

quality GenericImageResizeQuality

Determines what method to use for resampling the image.

Returns

GenericImage

Remarks

The algorithm used for the default (normal) quality value doesn't work with images larger than 65536 (2^16) pixels in either dimension for 32-bit programs.For 64-bit programs the limit is 2^48 and so not relevant in practice.