Click or drag to resize
ResizeType Enumeration
Specifies the resize type.

Namespace: Aspose.PSD
Assembly: Aspose.PSD (in Aspose.PSD.dll) Version: 20.6
Syntax
public enum ResizeType
Members
  Member nameValueDescription
None0 The pixels are not preserved during resize operation.
LeftTopToLeftTop1 Left top point of the new image will coincide with the left top point of the original image. Crop will occur if required.
RightTopToRightTop2 Right top point of the new image will coincide with the right top point of the original image. Crop will occur if required.
RightBottomToRightBottom3 Right bottom point of the new image will coincide with the right bottom point of the original image. Crop will occur if required.
LeftBottomToLeftBottom4 Left bottom point of the new image will coincide with the left bottom point of the original image. Crop will occur if required.
CenterToCenter5 Center of the new image will coincide with the center of the original image. Crop will occur if required.
LanczosResample6 Resample using lanczos algorithm with a=3.
NearestNeighbourResample7 Resample using nearest neighbour algorithm.
AdaptiveResample8 Resample using adaptive algorithm based on weighted and blended rational function and lanczos3 interpolation algorithms.
BilinearResample9 Resample using bilinear interpolation. Image pre-filtering is allowed to remove the noice before resample, when needed
HighQualityResample10 The high quality resample
CatmullRom11 The Catmull-Rom cubic interpolation method.
CubicConvolution12 The Cubic Convolution interpolation method
CubicBSpline13 The CubicBSpline cubic interpolation method
Mitchell14 The Mitchell cubic interpolation method
SinC15 The Sinc (Lanczos3) cubic interpolation method
Bell16 The Bell interpolation method
Examples
The following code demonstrates how to resize an image with a new SinC resize type.
[C#]

string sourceFile = "sample.psd";
string destName = "ResamplerSinCStripes_after.psd";

// Load an existing image into an instance of PsdImage class
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
    image.Resize(300, 300, ResizeType.SinC);
    image.Save(destName, new PsdOptions(image));
}
Examples
The following code demonstrates how to resize an image with a new Bell resize type.
[C#]

string sourceFile = "sample.psd";
string destName = "ResamplerBellStripes_after.psd";

// Load an existing image into an instance of PsdImage class
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
    image.Resize(300, 300, ResizeType.Bell);
    image.Save(destName, new PsdOptions(image));
}
Examples
The following code demonstrates how to resize an image with a new Mitchell resize type.
[C#]

string sourceFile = "sample.psd";
string destName = "ResamplerMitchellStripes_after.psd";

// Load an existing image into an instance of PsdImage class
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
    image.Resize(300, 300, ResizeType.Mitchell);
    image.Save(destName, new PsdOptions(image));
}
Examples
The following code demonstrates how to resize an image with a new CatmullRom resize type.
[C#]

string sourceFile = "sample.psd";
string destName = "ResamplerCatmullRomStripes_after.psd";

// Load an existing image into an instance of PsdImage class
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
    image.Resize(300, 300, ResizeType.CatmullRom);
    image.Save(destName, new PsdOptions(image));
}
Examples
The following code demonstrates how to resize an image with a new CubicBSpline resize type.
[C#]

string sourceFile = "sample.psd";
string destName = "ResamplerCubicBSplineStripes_after.psd";

// Load an existing image into an instance of PsdImage class
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
    image.Resize(300, 300, ResizeType.CubicBSpline);
    image.Save(destName, new PsdOptions(image));
}
Examples
The following code demonstrates how to resize an image with a new CubicConvolution resize type.
[C#]

string sourceFile = "sample.psd";
string destName = "ResamplerCubicConvolutionStripes_after.psd";

// Load an existing image into an instance of PsdImage class
using (PsdImage image = (PsdImage)Image.Load(sourceFile))
{
    image.Resize(300, 300, ResizeType.CubicConvolution);
    image.Save(destName, new PsdOptions(image));
}
See Also