ImgSetVertResolution

Top  Previous  Next

Prototype

 

ImgSetVertResolution(intImageHandle; intResolution)

 

Description

 

Sets the vertical image resolution in DPI, dots per inch.

 

Parameters

 

intImageHandle: integer value corresponding to the image handle.

 

intResolution: integer value, the vertical image resolution

 

Returned value

 

None.

 

Notes

 

None.

 

Example

 

// =============================================

// This sample scale image size matching 200 DPI

// =============================================

 

// Get current resolution

XRes:=ImgGetHorzResolution(_CurrentImage);

YRes:=ImgGetVertResolution(_CurrentImage);

 

// Get current size

XSize:=ImgGetWidth(_CurrentImage);

YSize:=ImgGetHeight(_CurrentImage);

 

// Calculate new size at 200 DPI

NewXSize:=Round((XSize/XRes)*200);

NewYSize:=Round((YSize/YRes)*200)

 

// Scale the image to new size

ImgScale(_CurrentImage, NewXSize, NewYSize, True);

 

// Set image to 200 DPI resolution

ImgSetHorzResolution(_CurrentImage, 200);

ImgSetVertResolution(_CurrentImage, 200);