Table of Contents

Method ResizeTo

Namespace
BitMiracle.Docotic.Pdf
Assembly
BitMiracle.Docotic.Pdf.dll

ResizeTo(int, int, PdfImageCompression)

Resizes image to specified width and height and compresses it using specified compression scheme.

public void ResizeTo(int width, int height, PdfImageCompression compression)

Parameters

width int

The new width for the image.

height int

The new height for the image.

compression PdfImageCompression

The compression scheme to use. Only Jpeg, Jpeg2000, Flate and Group4Fax schemes are supported now.

Remarks

This method uses default options for specified compression scheme.

Please use ResizeTo(int, int, PdfImageCompression, int) overload if you want to tune up compression scheme.

This method throws UnsupportedImageException when used on an inline image. You can check IsInline property before invoking this method.

ResizeTo(int, int, PdfImageCompression, int)

Resizes image to specified width and height and compresses it using specified compression scheme.

public void ResizeTo(int width, int height, PdfImageCompression compression, int option)

Parameters

width int

The new width for the image.

height int

The new height for the image.

compression PdfImageCompression

The compression scheme to use. Only Jpeg, Jpeg2000, Flate and Group4Fax schemes are supported now.

option int

The option for compression scheme.

Remarks

If compression is Flate then option parameter should specify compression quality (value should be between 0 and 9 inclusive).

If compression is Jpeg then option parameter should specify a JPEG quality (value should be between 1 and 100 inclusive).

If compression is Jpeg2000 then option parameter should specify a JPEG 2000 quality (value should be not less than 1).

If compression is Group4Fax then option parameter should specify a threshold level (value should be between 0 and 255 inclusive).

This method throws UnsupportedImageException when used on an inline image. You can check IsInline property before invoking this method.