Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

libibs(3X)

ibs_encode(3X)

ibs_decode(3X)

ibs_getioerror(3X)

IBS_ZOOM(3X)  —  NEWS-OS Programmer’s Manual

NAME

ibs_zoom_open, ibs_zoom − Magnifies or reduces image data on the horizontal axis

SYNOPSIS

ibs_zoom_open(iniw, inx, inw, outiw, outx, outw, flag, mode, work,
inf, inarg, outf, outarg)
int iniw, inx, inw;
int outiw, outx, outw, flag, mode;
int ∗work;
int (∗inf)();
int inarg;
int (∗outf)();
int outarg;

ibs_zoom(inimgadr, outimgadr, work)
char ∗inimgadr, ∗outimgadr;
int ∗work;

ibs_zoom_getworksize(inw, outw, flag, mode)
int inw, out, flag, mode;

DESCRIPTION

These functions magnify or reduce image data on the horizontal (x) axis one line at a time. 
ibs_zoom_open sets the necessary variables for performing image magnification or reduction. 
iniw , inx and inw specify the input data area. 
outiw , outx and outw specify the area where output data is stored. 
iniw and outiw specify the image width (in dots) of the image data.  They must be multiples of 16. 
inx and outx specify, in dot units where the left edge is designated as 0, the position in the line where data is actually to be placed. 
inwand outw specify the length (in dots) of image data.  In all cases, ( inx + inw ) and ( outx + outw ) must not exceed iniw and outiw , respectively. 
flag is passed to outf without modification. 
If mode is set to 0 and function is reduction, adjoined dots are logical added. 

work specifies the internal work area whose size must be greater or equal to the return value of function ibs_zoom_getworksize. 
This work area must not be altered until zoom is completely finished.
inf and outf are the I/O functions.  It is possible to set both inf and outf to NULL, in which case the default I/O function is used.  In this case, the further knowledge about the I/O function and internal data format is not required. 
inarg and outarg are passed directly to the functions specified by inf and outf.
inf is a input function for converting the image data, once it has been read in, into a array of change-points. 
If inf is set to NULL, the default input function ibs_encode is called. 
The inf input function is used as follows, and the return value must be negative in case of an error. 

int (∗inf)(inarg, imgadr, iw, w, x, sline, flag)
int inarg;
char ∗imgadr;
int iw, w, x;
int ∗sline;
int flag;

The values set by ib_zoom_open are passed to inarg , iw , w , x and flag. 
iniw is passed as iw . 
inw is passed as w . 
inx is passed as x . 
The inimgadr setting is passed to imgadr.
In this function, the image data assigned by imgadr must not be altered. 
sline specifies the change-point array.  Its size is ( w + 2 ) ∗ 4. 
Refer to ibs_encode and ibs_decode for information on change-point arrays. 

outf is a pointer to the output function that reconstitutes the image data from the change-point array and writes it to the output buffer.  If outf is set to NULL, the default output function ibs_decode is called. 
Here the output function outf is used as follows, and the return value must be such that it results in a negative value in case of an error. 

int (∗outf)(outarg, imgadr, iw, w, x, sline, flag)
int outarg;
char ∗imgadr;
int iw, w, x;
int ∗sline;
int flag;

The values set using ib_zoom_open are passed as outarg , iw , w , x , sline and flag .
outiw is passed as iw . 
outw is passed as w . 
outx is passed as x . 
outimgadr is passed to imgadr.
sline specifies the change-point array.  It must not be modified within a function. 
Refer to ibs_encode and ibs_decode for information on change-point array. 

ibs_zoom actually reduces or magnifies one line of image data at a time. 
inimgadr and outimgadr are used to specify the input and output buffers. 
inimgadr and outimgar must be even-numbered addresses
A 0 is returned if processing completes successfully.

ibs_zoom_getworksize returns the size of the area needed by work. If, for example, images of different sizes are to be processed, the larger value must be used. The value returned is (( inw + 2) ∗ 8) + 256
 in current version.

RETURN VALUE

A −1 is returned in case of a parameter error. 

If inf results in an error, a −2 is returned.  If outf results in an error, a −3 is returned.  If the work area is destroyed, a −4 is returned. 

To determine if any errors were returned by inf or outf , use ibs_getioerror. 

FILES

/usr/sony/lib/libibs.a

SEE ALSO

libibs(3X) ibs_encode(3X) ibs_decode(3X) ibs_getioerror(3X)

NEWS-OSRelease 4.1C

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