C# Class Aspose.Words.Examples.CSharp.Programming_Documents.Working_with_Images.Resampler

Show file Open project: aspose-words/Aspose.Words-for-.NET

Public Methods

Method Description
Resample ( Document doc, int desiredPpi, int jpegQuality ) : int

Resamples all images in the document that are greater than the specified PPI (pixels per inch) to the specified PPI And converts them to JPEG with the specified quality setting.

Private Methods

Method Description
GetEncoderInfo ( ImageFormat format ) : System.Drawing.Imaging.ImageCodecInfo

Gets the codec info for the specified image format. Throws if cannot find.

ResampleCore ( ImageData imageData, SizeF shapeSizeInPoints, int ppi, int jpegQuality ) : bool

Resamples one VML or DrawingML image

Method Details

Resample() public static method

Resamples all images in the document that are greater than the specified PPI (pixels per inch) to the specified PPI And converts them to JPEG with the specified quality setting.
public static Resample ( Document doc, int desiredPpi, int jpegQuality ) : int
doc Document The document to process.
desiredPpi int Desired pixels per inch. 220 high quality. 150 screen quality. 96 email quality.
jpegQuality int 0 - 100% JPEG quality.
return int