Previous: x/ zvpixsizeb Up: Miscellaneous Routines Next: x/ zvselpi
status = xvpixsizeu(pixsize, type, unit) status = zvpixsizeu(pixsize, type, unit);
Return the size of a pixel in bytes from a file. This routine is exactly like x/ zvpixsize except that the IHOST and RHOST values are obtained from the file specified by UNIT, which must be open. It is provided merely as a shortcut to get the pixel size of a file.
Arguments:
Returns the size of a pixel in bytes. If an error occurs (such as an invalid data type), PIXSIZE is returned as 0.
TYPE is the data type of the pixel. It corresponds to the FORMAT label item in a file. It may be one of the standard VICAR data types: ``BYTE'', ``HALF'', ``FULL'', ``REAL'', ``DOUB'', or ``COMP''. The types ``WORD'', ``LONG'', and ``COMPLEX'' are also accepted, but are obsolete and should not be used.
UNIT is the unit number of an open file, which is used to obtain the source INTFMT and REALFMT. The values obtained from the file are used exactly like the x/ zvpixsize IHOST and RHOST.