Functions

Geometric Operations
[Image Processing]

Collaboration diagram for Geometric Operations:

Functions

void imProcessCalcRotateSize (int width, int height, int *new_width, int *new_height, double cos0, double sin0)
int imProcessRotate (const imImage *src_image, imImage *dst_image, double cos0, double sin0, int order)
int imProcessRotateRef (const imImage *src_image, imImage *dst_image, double cos0, double sin0, int x, int y, int to_origin, int order)
void imProcessRotate90 (const imImage *src_image, imImage *dst_image, int dir_clockwise)
void imProcessRotate180 (const imImage *src_image, imImage *dst_image)
void imProcessMirror (const imImage *src_image, imImage *dst_image)
void imProcessFlip (const imImage *src_image, imImage *dst_image)
int imProcessRadial (const imImage *src_image, imImage *dst_image, float k1, int order)
int imProcessSwirl (const imImage *src_image, imImage *dst_image, float k1, int order)
void imProcessInterlaceSplit (const imImage *src_image, imImage *dst_image1, imImage *dst_image2)

Detailed Description

Operations to change the shape of the image.
All geometric operations include the alpha channel if any.
See im_process_loc.h

Function Documentation

void imProcessCalcRotateSize ( int  width,
int  height,
int *  new_width,
int *  new_height,
double  cos0,
double  sin0 
)

Calculates the size of the new image after rotation.

im.ProcessCalcRotateSize(width: number, height: number, cos0: number, sin0: number) [in Lua 5] 
int imProcessRotate ( const imImage src_image,
imImage dst_image,
double  cos0,
double  sin0,
int  order 
)

Rotates the image using the given interpolation order (see imProcessResize).
Images must be of the same type. The target size can be calculated using imProcessCalcRotateSize to fit the new image size, or can be any size, including the original size. The rotation is relative to the center of the image.
Returns zero if the counter aborted.

im.ProcessRotate(src_image: imImage, dst_image: imImage, cos0: number, sin0: number[, order]: number) -> counter: boolean [in Lua 5] 
im.ProcessRotateNew(image: imImage, cos0, sin0, order: number) -> counter: boolean, new_image: imImage [in Lua 5] 
int imProcessRotateRef ( const imImage src_image,
imImage dst_image,
double  cos0,
double  sin0,
int  x,
int  y,
int  to_origin,
int  order 
)

Rotates the image using the given interpolation order (see imProcessResize).
Images must be of the same type. Target can have any size, including the original size.
The rotation is relative to the reference point. But the result can be shifted to the origin.
Returns zero if the counter aborted.

im.ProcessRotateRef(src_image: imImage, dst_image: imImage, cos0: number, sin0: number, x: number, y: number, to_origin: boolean, order: number) -> counter: boolean [in Lua 5] 
im.ProcessRotateRefNew(image: imImage, cos0: number, sin0: number, x: number, y: number, to_origin: boolean[, order]: number) -> counter: boolean, new_image: imImage [in Lua 5] 
void imProcessRotate90 ( const imImage src_image,
imImage dst_image,
int  dir_clockwise 
)

Rotates the image in 90 degrees counterclockwise or clockwise. Swap columns by lines.
Images must be of the same type. Target width and height must be source height and width.
Direction can be clockwise (1) or counter clockwise (-1).

im.ProcessRotate90(src_image: imImage, dst_image: imImage, dir_clockwise: boolean) [in Lua 5] 
im.ProcessRotate90New(image: imImage, dir_clockwise: boolean) -> new_image: imImage [in Lua 5] 
void imProcessRotate180 ( const imImage src_image,
imImage dst_image 
)

Rotates the image in 180 degrees. Swap columns and swap lines.
Images must be of the same type and size.

im.ProcessRotate180(src_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessRotate180New(image: imImage) -> new_image: imImage [in Lua 5] 
void imProcessMirror ( const imImage src_image,
imImage dst_image 
)

Mirror the image in a horizontal flip. Swap columns.
Images must be of the same type and size. Can be done in-place.

im.ProcessMirror(src_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessMirrorNew(image: imImage) -> new_image: imImage [in Lua 5] 
void imProcessFlip ( const imImage src_image,
imImage dst_image 
)

Apply a vertical flip. Swap lines.
Images must be of the same type and size. Can be done in-place.

im.ProcessFlip(src_image: imImage, dst_image: imImage) [in Lua 5] 
im.ProcessFlipNew(image: imImage) -> new_image: imImage [in Lua 5] 
int imProcessRadial ( const imImage src_image,
imImage dst_image,
float  k1,
int  order 
)

Apply a radial distortion using the given interpolation order (see imProcessResize).
Images must be of the same type and size. Returns zero if the counter aborted.

im.ProcessRadial(src_image: imImage, dst_image: imImage, k1: number, order: number) -> counter: boolean [in Lua 5] 
im.ProcessRadialNew(image: imImage, k1: number[, order]: number) -> counter: boolean, new_image: imImage [in Lua 5] 
int imProcessSwirl ( const imImage src_image,
imImage dst_image,
float  k1,
int  order 
)

Apply a swirl distortion using the given interpolation order (see imProcessResize).
Images must be of the same type and size. Returns zero if the counter aborted.

im.ProcessSwirl(src_image: imImage, dst_image: imImage, k: number, order: number) -> counter: boolean [in Lua 5] 
im.ProcessSwirlNew(image: imImage, k: number[, order]: number) -> counter: boolean, new_image: imImage [in Lua 5] 
void imProcessInterlaceSplit ( const imImage src_image,
imImage dst_image1,
imImage dst_image2 
)

Split the image in two images, one containing the odd lines and other containing the even lines.
Images must be of the same type. Height of the output images must be half the height of the input image. If the height of the input image is odd then the first image must have height equals to half+1.

im.ProcessInterlaceSplit(src_image: imImage, dst_image1: imImage, dst_image2: imImage) [in Lua 5] 
im.ProcessInterlaceSplitNew(image: imImage) -> new_image1: imImage, new_image2: imImage [in Lua 5]