Image.Resize

Resize(int, int, ResizeType)

Resizes the image.

public abstract void Resize(int newWidth, int newHeight, ResizeType resizeType)
ParameterTypeDescription
newWidthInt32The new width.
newHeightInt32The new height.
resizeTypeResizeTypeThe resize type.

See Also


Resize(int, int)

Resizes the image. The default NearestNeighbourResample is used.

public void Resize(int newWidth, int newHeight)
ParameterTypeDescription
newWidthInt32The new width.
newHeightInt32The new height.

Examples

The following example demonstrates how to resize PSD image and result we get by Aspose.PSD

[C#]

string sourceFileName = "1.psd";
string exportPathPsd = "ResizeTest.psd";
string exportPathPng = "ResizeTest.png";

using (RasterImage image = Image.Load(sourceFileName) as RasterImage)
{
    image.Resize(190, 143);
    image.Save(exportPathPsd, new PsdOptions());
    image.Save(exportPathPng, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
}

See Also


Resize(int, int, ImageResizeSettings)

Resizes the image.

public abstract void Resize(int newWidth, int newHeight, ImageResizeSettings settings)
ParameterTypeDescription
newWidthInt32The new width.
newHeightInt32The new height.
settingsImageResizeSettingsThe resize settings.

See Also