Resize

EpsImage.Resize method (1 of 2)

Resizes the image.

public override 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.

Examples

Resize EPS image and export it to PNG format.

[C#]

// Load EPS image
using (var image = Image.Load("AstrixObelix.eps"))
{
    // Resize the image using the Mitchell cubic interpolation method
    image.Resize(400, 400, ResizeType.Mitchell);

    // Export image to PNG format
    image.Save("ExportResult.png", new PngOptions());
}

See Also


EpsImage.Resize method (2 of 2)

Resizes the image.

public override 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.

Examples

Resize EPS image using advanced settings.

[C#]

// Load EPS image
using (var image = Image.Load("AstrixObelix.eps"))
{
    // Resize the image using advanced resize settings
    image.Resize(400, 400, new ImageResizeSettings
    {
        // Set the interpolation mode
        Mode = ResizeType.LanczosResample,

        // Set the type of the filter
        FilterType = ImageFilterType.SmallRectangular,

        // Sets the color compare method
        ColorCompareMethod = ColorCompareMethod.Euclidian,

        // Set the color quantization method
        ColorQuantizationMethod = ColorQuantizationMethod.Popularity
    });

    // Export image to PNG format
    image.Save("ExportResult.png", new PngOptions());
}

See Also