public final class ResizeType
extends com.aspose.ms.System.Enum
Specifies the resize type.
This example loads an image and resizes it using various resizing methods.
String dir = "c:\\temp\\"; com.aspose.imaging.Image image = com.aspose.imaging.Image.load(dir + "sample.gif"); try { // Scale up by 2 times using Nearest Neighbour resampling. image.resize(image.getWidth() * 2, image.getHeight() * 2, com.aspose.imaging.ResizeType.NearestNeighbourResample); image.save(dir + "upsample.nearestneighbour.gif"); } finally { image.dispose(); } image = com.aspose.imaging.Image.load(dir + "sample.gif"); try { // Scale down by 2 times using Nearest Neighbour resampling. image.resize(image.getWidth() / 2, image.getHeight() / 2, com.aspose.imaging.ResizeType.NearestNeighbourResample); image.save(dir + "downsample.nearestneighbour.gif"); } finally { image.dispose(); } image = com.aspose.imaging.Image.load(dir + "sample.gif"); try { // Scale up by 2 times using Bilinear resampling. image.resize(image.getWidth() * 2, image.getHeight() * 2, com.aspose.imaging.ResizeType.BilinearResample); image.save(dir + "upsample.bilinear.gif"); } finally { image.dispose(); } image = com.aspose.imaging.Image.load(dir + "sample.gif"); try { // Scale down by 2 times using Bilinear resampling. image.resize(image.getWidth() / 2, image.getHeight() / 2, com.aspose.imaging.ResizeType.BilinearResample); image.save(dir + "downsample.bilinear.gif"); } finally { image.dispose(); }
Modifier and Type | Field and Description |
---|---|
static int |
AdaptiveResample
Resample using adaptive algorithm based on weighted and blended rational function and lanczos3 interpolation algorithms.
|
static int |
Bell
The Bell interpolation method
|
static int |
BilinearResample
Resample using bilinear interpolation.
|
static int |
CatmullRom
The Catmull-Rom cubic interpolation method.
|
static int |
CenterToCenter
Center of the new image will coincide with the center of the original image.
|
static int |
CubicBSpline
The CubicBSpline cubic interpolation method
|
static int |
CubicConvolution
The Cubic Convolution interpolation method
|
static int |
HighQualityResample
The high quality resample
|
static int |
LanczosResample
Resample using lanczos algorithm with a=3.
|
static int |
LeftBottomToLeftBottom
Left bottom point of the new image will coincide with the left bottom point of the original image.
|
static int |
LeftTopToLeftTop
Left top point of the new image will coincide with the left top point of the original image.
|
static int |
Mitchell
The Mitchell cubic interpolation method
|
static int |
NearestNeighbourResample
Resample using nearest neighbour algorithm.
|
static int |
None
The pixels are not preserved during resize operation.
|
static int |
RightBottomToRightBottom
Right bottom point of the new image will coincide with the right bottom point of the original image.
|
static int |
RightTopToRightTop
Right top point of the new image will coincide with the right top point of the original image.
|
static int |
SinC
The Sinc (Lanczos3) cubic interpolation method
|
Clone, CloneTo, format, format, get_Caption, get_Value, getName, getName, getNames, getNames, getNames, getUnderlyingType, getUnderlyingType, getValue, getValues, getValues, getValues, isDefined, isDefined, isDefined, isDefined, parse, parse, parse, parse, register, toObject, toString
public static final int None
The pixels are not preserved during resize operation.
public static final int LeftTopToLeftTop
Left top point of the new image will coincide with the left top point of the original image. Crop will occur if required.
public static final int RightTopToRightTop
Right top point of the new image will coincide with the right top point of the original image. Crop will occur if required.
public static final int RightBottomToRightBottom
Right bottom point of the new image will coincide with the right bottom point of the original image. Crop will occur if required.
public static final int LeftBottomToLeftBottom
Left bottom point of the new image will coincide with the left bottom point of the original image. Crop will occur if required.
public static final int CenterToCenter
Center of the new image will coincide with the center of the original image. Crop will occur if required.
public static final int LanczosResample
Resample using lanczos algorithm with a=3.
public static final int NearestNeighbourResample
Resample using nearest neighbour algorithm.
public static final int AdaptiveResample
Resample using adaptive algorithm based on weighted and blended rational function and lanczos3 interpolation algorithms.
public static final int BilinearResample
Resample using bilinear interpolation. Image pre-filtering is allowed to remove the noice before resample, when needed
public static final int HighQualityResample
The high quality resample
public static final int CatmullRom
The Catmull-Rom cubic interpolation method.
public static final int CubicConvolution
The Cubic Convolution interpolation method
public static final int CubicBSpline
The CubicBSpline cubic interpolation method
public static final int Mitchell
The Mitchell cubic interpolation method
public static final int SinC
The Sinc (Lanczos3) cubic interpolation method
public static final int Bell
The Bell interpolation method
Copyright (c) 2008-2020 Aspose Pty Ltd. All Rights Reserved.