ImageMan DLL Suite Version 8Submit feedback on this topic   

ImgRotate

HANDLE IMAPI ImgRotate ( hImage, nDegree, rgbCol )

This function rotates the referenced image in the counterclockwise direction and returns a handle to the new image.

 

Parameter

Type

Description

hImage

HANDLE

Identifies the image to be rotated.

nDegree

UINT

Specifies the number of degrees (measured counterclockwise) to rotate the image.

rgbCol

COLOREF

Specifies the background color when rotating to non 90 degree multiples.

 

Return Value

The return value indicates whether the image was rotated successfully.

A return value of NULL indicates the rotation failed while a nonzero value is the ImageMan handle to the newly rotated image.

Comments

Images can be rotated at any angle between 0 and 360 degrees in hundredth of degree increments.

Note

This function does not alter the original image; rather, it returns a new image based on the passed parameters.

Example

HANDLE hRotatedImg;

// To rotate an Image 22.5 degrees using white for the non image background

// The RGB macro is defined in windows.h

hRotatedImg = ImgRotate( hImg, 2250, RGB(255, 255, 255) );

if( !hRotatedImg )

ImgErrBox( hWnd );

// Display the Error

Else

// rotates

 

 


© 1995-2004 Data Techniques, Inc. All rights reserved.