Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

xil_affine(3)

xil_scale(3)

NAME

xil_scale − scale an image

SYNOPSIS

#include <xil/xil.h>

void xil_scale (XilImage src,

XilImage dst,
char ∗interpolation,
float xscale,
float yscale);

DESCRIPTION

This function scales an image about its origin.  By default, an image’s origin is its upper-left corner (0.0, 0.0). You can change the origin with the xil_set_origin() function.

src is the source image handle.  dst is the destination image handle.  interpolation is a string that specifies the type of interpolation to be used.  The supported interpolation types are nearest (nearest neighbor), bilinear, bicubic, and general. xscale and yscale are the x and y scale factors. Scale factors of less than 1.0 reduce the size of an image in x and y. 

ROI Behavior

If an ROI (region of interest) is attached to the source image, it is used as a read mask and is scaled into the destination image’s space, where it is intersected with the destination ROI (if there is one). 

ERRORS

For a complete list of XIL error messages by number, consult Appendix B of the XIL Programmer’s Guide. 

EXAMPLES

Scale an image by 2.3 in the x direction and 4.3 in the y direction using bicubic interpolation. 

XilImage src, dst;
xil_scale(src, dst, "bicubic", 2.3, 4.3);

NOTES

The source and destination images to be scaled must be the same type and number of bands. This operation cannot be performed in place. 

SEE ALSO

xil_affine(3). 

SunOS 5.6  —  Last change: 16 June 1993

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026