Enum ResizeType
이름 공간 : Aspose.Imaging 모임: Aspose.Imaging.dll (25.4.0)
리시즈 유형을 지정합니다.
public enum ResizeType
Fields
AdaptiveResample = 8
샘플을 사용하여 적응 알고리즘을 기반으로 무게와 혼합 합리적 기능과 lanczos3 interpolation 알고리즘.
Bell = 16
Bell Interpolation 방법
BilinearResample = 9
이미지 사전 필터링은 필요할 때 다시 샘플하기 전에 소음을 제거 할 수 있습니다.
CatmullRom = 11
Catmull-Rom 큐브 인터폴레이션 방법
CenterToCenter = 5
새 이미지의 중심은 원본 이미지의 중심과 일치합니다.
CubicBSpline = 13
CubicBSpline 큐브 인터폴레이션 방법
CubicConvolution = 12
Cubic Convolution Interpolation 방법
HighQualityResample = 10
높은 품질의 샘플
LanczosResample = 6
랜치오스 알고리즘을 사용하여 A=3을 참조하십시오.
LeftBottomToLeftBottom = 4
새 이미지의 왼쪽 하단 지점은 원래 이미지의 왼쪽 하단 지점과 일치합니다.
LeftTopToLeftTop = 1
새 이미지의 왼쪽 상단 지점은 원래 이미지의 왼쪽 상단 지점과 일치합니다.
Mitchell = 14
Mitchell Cubic Interpolation 방법
NearestNeighbourResample = 7
가장 가까운 이웃 알고리즘을 사용하여 복제합니다.
None = 0
픽셀은 재시작 작업 중에 보존되지 않습니다.
RightBottomToRightBottom = 3
새 이미지의 오른쪽 하단 지점은 원본 이미지의 오른쪽 하단 지점과 일치합니다.
RightTopToRightTop = 2
새 이미지의 오른쪽 상단 지점은 원본 이미지의 오른쪽 상단 지점과 일치합니다.
SinC = 15
Sinc (Lanczos3) 큐브 인터폴레이션 방법
Examples
특정 Resize 타입을 사용하여 이미지를 재시작합니다.
using (var image = Image.Load("Photo.jpg"))
{
image.Resize(640, 480, ResizeType.CatmullRom);
image.Save("ResizedPhoto.jpg");
image.Resize(1024, 768, ResizeType.CubicConvolution);
image.Save("ResizedPhoto2.jpg");
var resizeSettings = new ImageResizeSettings
{
Mode = ResizeType.CubicBSpline,
FilterType = ImageFilterType.SmallRectangular
};
image.Resize(800, 800, resizeSettings);
image.Save("ResizedPhoto3.jpg");
}
이 예제는 이미지를 충전하고 다양한 재시지 방법을 사용하여 재시지합니다.
string dir = "c:\\temp\\";
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.gif"))
{
// Scale up by 2 times using Nearest Neighbour resampling.
image.Resize(image.Width* 2, image.Height* 2, Aspose.Imaging.ResizeType.NearestNeighbourResample);
image.Save(dir + "upsample.nearestneighbour.gif");
}
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.gif"))
{
// Scale down by 2 times using Nearest Neighbour resampling.
image.Resize(image.Width / 2, image.Height / 2, Aspose.Imaging.ResizeType.NearestNeighbourResample);
image.Save(dir + "downsample.nearestneighbour.gif");
}
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.gif"))
{
// Scale up by 2 times using Bilinear resampling.
image.Resize(image.Width* 2, image.Height* 2, Aspose.Imaging.ResizeType.BilinearResample);
image.Save(dir + "upsample.bilinear.gif");
}
using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(dir + "sample.gif"))
{
// Scale down by 2 times using Bilinear resampling.
image.Resize(image.Width / 2, image.Height / 2, Aspose.Imaging.ResizeType.BilinearResample);
image.Save(dir + "downsample.bilinear.gif");
}