DicomImageResize Method (Int32, Int32, ImageResizeSettings)
Resizes the image.

Namespace: Aspose.Imaging.FileFormats.Dicom
Assembly: Aspose.Imaging (in Aspose.Imaging.dll) Version: 20.06
Syntax
public override void Resize(
	int newWidth,
	int newHeight,
	ImageResizeSettings settings
)

Parameters

newWidth
Type: SystemInt32
The new width.
newHeight
Type: SystemInt32
The new height.
settings
Type: Aspose.ImagingImageResizeSettings
The resize settings.
Examples
This example loads a DICOM image and resizes it using various resizing settings.
[C#]

string dir = "c:\\temp\\";

Aspose.Imaging.ImageResizeSettings resizeSettings = new Aspose.Imaging.ImageResizeSettings();

// The adaptive algorithm based on weighted and blended rational function and lanczos3 interpolation.
resizeSettings.Mode = Aspose.Imaging.ResizeType.AdaptiveResample;

// The small rectangular filter
resizeSettings.FilterType = Aspose.Imaging.ImageFilterType.SmallRectangular;

// The number of colors in the palette.
resizeSettings.EntriesCount = 256;

// The color quantization is not used
resizeSettings.ColorQuantizationMethod = ColorQuantizationMethod.None;

// The euclidian method
resizeSettings.ColorCompareMethod = ColorCompareMethod.Euclidian;

using (Aspose.Imaging.Image image = (Aspose.Imaging.Image)Aspose.Imaging.Image.Load(dir + "sample.dicom"))
{
    Aspose.Imaging.FileFormats.Dicom.DicomImage dicomImage = (Aspose.Imaging.FileFormats.Dicom.DicomImage)image;

    // Scale down by 2 times using adaptive resampling.
    dicomImage.Resize(image.Width / 2, image.Height / 2, resizeSettings);

    // Save to PNG
    dicomImage.Save(dir + "downsample.adaptive.png", new Aspose.Imaging.ImageOptions.PngOptions());
}
See Also