Resize image to page
Visual Basic |
---|
Public Sub Resize( _ ByVal PageSize As EPageSize, _ Optional ByVal PageOrientation As EPageOrientation = epgoAuto, _ Optional ByVal ImageAlignment As EImageAlignment = epiaCenter, _ Optional ByVal Width As Double = 8.5, _ Optional ByVal Height As Double = 11, _ Optional ByVal Unit As ESizeUnit = esuInch _ ) |
- PageSize
Value Description epgsCustom Custom image size epgsOriginal Image size before image is modified epgsLetter Letter size epgsLegal Legal size epgsLedger Ledger size epgsA4 A4 page size - PageOrientation
Value Description epgoAuto Orientation is determind automaticaly epgoPortrait Use portrait orientation epgoLandscape Use landscape orientation - ImageAlignment
Value Description epiaCenter epiaTopLeft epiaTopRight epiaBottomLeft epiaBottomRight epiaTopCenter epiaBottomCenter epiaLeftCenter epiaRightCenter epiaBestFit - Width
- Height
- Unit
Value Description esuPixel esuInch esuCentimeter
Scanning document of standard size often produces images of slightly different dimension. Some image processing operations, like BorderExtract, AutoCrop, AutoDeskew change size of the image.
Resize method sets of an image to one of:
- Predefined size (PageSize, PageOrientation parameters)
- Custom size (PageSize = epgsCusom, Width, Height, Unit paramters)
- Size of the image when it wos open (PageSize = epgsOriginal)
Image data before resizing are:
- Placed on resized image according to ImageAlignment paramter in the center of an new image, one of the corners, or alligned with center of one of sides. NOTE: If ImageAlignment is not epiaBestFit and new image size is smaller than original some of orginal image information will be lost.
- Scaled to occupy maximum area of resized image (ImageAlignment = epiaBestFit)