IM: Image Resize

IM - Imaging Libray

Image Resize
[Image Processing]


Detailed Description

Operations to change the image size.
See im_process_loc.h


Functions

int imProcessReduce (const imImage *src_image, imImage *dst_image, int order)
int imProcessResize (const imImage *src_image, imImage *dst_image, int order)
void imProcessReduceBy4 (const imImage *src_image, imImage *dst_image)
void imProcessCrop (const imImage *src_image, imImage *dst_image, int xmin, int ymin)
void imProcessAddMargins (const imImage *src_image, imImage *dst_image, int xmin, int ymin)

Function Documentation

int imProcessReduce const imImage src_image,
imImage dst_image,
int  order
 

Only reduze the image size using the given decimation order.
Supported interpolation orders:

  • 0 - zero order (mean)
  • 1 - first order (bilinear decimation) Images must be of the same type.
    Returns zero if the counter aborted.

int imProcessResize const imImage src_image,
imImage dst_image,
int  order
 

Change the image size using the given interpolation order.
Supported interpolation orders:

  • 0 - zero order (near neighborhood)
  • 1 - first order (bilinear interpolation)
  • 3 - third order (bicubic interpolation) Images must be of the same type.
    Returns zero if the counter aborted.

void imProcessReduceBy4 const imImage src_image,
imImage dst_image
 

Reduze the image area by 4 (w/2,h/2).
Images must be of the same type. Destiny image size must be source image width/2, height/2.

void imProcessCrop const imImage src_image,
imImage dst_image,
int  xmin,
int  ymin
 

Reduze the image size by removing pixels.
Images must be of the same type. Destiny image size must be smaller than source image width-xmin, height-ymin.

void imProcessAddMargins const imImage src_image,
imImage dst_image,
int  xmin,
int  ymin
 

Increase the image size by adding pixels with zero value.
Images must be of the same type. Destiny image size must be greatter than source image width+xmin, height+ymin.