PdfImage.RecompressWithJpeg2000 Method (Int32)

Recompresses image data using JPEG 2000 format and specified compression ratio.

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


public void RecompressWithJpeg2000(
	int compressionRatio
Public Sub RecompressWithJpeg2000 ( 
	compressionRatio As Integer


Type: System.Int32
The compression ratio to use while compressing.


The compression ratio should be not less than 1.

The compression ratio equal to 1 causes lossless compression but produces biggest output. The larger compression ratio values cause smaller outputs in expense of image detail.

The compression ratio of N means "compress N times".

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

For a mask image, this method emits a warning in logs and does nothing. A mask image is an image with IsMask equal to true.

See Also