PdfImage.ResizeTo Method (Int32, Int32, PdfImageCompression)

Docotic.Pdf library help > BitMiracle.Docotic.Pdf > PdfImage Class > PdfImage Methods > ResizeTo Method > ResizeTo Method (Int32, Int32, PdfImageCompression)
Resizes image to specified width and height and compresses it using specified compression scheme.

Namespace:  BitMiracle.Docotic.Pdf
Assembly:  BitMiracle.Docotic.Pdf (in BitMiracle.Docotic.Pdf.dll)

Syntax

C#
public void ResizeTo(
	int width,
	int height,
	PdfImageCompression compression
)
VB
Public Sub ResizeTo ( 
	width As Integer,
	height As Integer,
	compression As PdfImageCompression
)

Parameters

width
Type: System.Int32
The new width for the image.
height
Type: System.Int32
The new height for the image.
compression
Type: BitMiracle.Docotic.Pdf.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(Int32, Int32, PdfImageCompression, Int32) 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.

See Also