Image.Resize
Contents
[
Hide
]Resize(int, int, ResizeType)
Resizes the image.
public abstract void Resize(int newWidth, int newHeight, ResizeType resizeType)
| Parameter | Type | Description | 
|---|---|---|
| newWidth | Int32 | The new width. | 
| newHeight | Int32 | The new height. | 
| resizeType | ResizeType | The resize type. | 
See Also
- enum ResizeType
 - class Image
 - namespace Aspose.PSD
 - assembly Aspose.PSD
 
Resize(int, int)
Resizes the image. The default NearestNeighbourResample is used.
public void Resize(int newWidth, int newHeight)
| Parameter | Type | Description | 
|---|---|---|
| newWidth | Int32 | The new width. | 
| newHeight | Int32 | The 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, new PsdLoadOptions() { LoadEffectsResource = true }) as RasterImage)
{
    image.Resize(190, 143);
    image.Save(exportPathPsd, new PsdOptions());
    image.Save(exportPathPng, new PngOptions() { ColorType = PngColorType.TruecolorWithAlpha });
}
See Also
- class Image
 - namespace Aspose.PSD
 - assembly Aspose.PSD
 
Resize(int, int, ImageResizeSettings)
Resizes the image.
public abstract void Resize(int newWidth, int newHeight, ImageResizeSettings settings)
| Parameter | Type | Description | 
|---|---|---|
| newWidth | Int32 | The new width. | 
| newHeight | Int32 | The new height. | 
| settings | ImageResizeSettings | The resize settings. | 
See Also
- class ImageResizeSettings
 - class Image
 - namespace Aspose.PSD
 - assembly Aspose.PSD