PdfImage.Scale Method (Double, PdfImageCompression, Int32)

Docotic.Pdf library help > BitMiracle.Docotic.Pdf > PdfImage Class > PdfImage Methods > Scale Method > Scale Method (Double, PdfImageCompression, Int32)
Scales image using specified scale factor and compresses it using specified compression scheme.

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


public void Scale(
	double factor,
	PdfImageCompression compression,
	int option
Public Sub Scale ( 
	factor As Double,
	compression As PdfImageCompression,
	option As Integer


Type: System.Double
The scale factor.
Type: BitMiracle.Docotic.Pdf.PdfImageCompression
The compression scheme to use. Only Jpeg, Jpeg2000, Flate and Group4Fax schemes are supported now.
Type: System.Int32
The option for compression scheme.


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.

See Also