[Back to Interface] [Next]

DF24addimage/d2aimg

intn DF24addimage(char *filename, VOIDP image, int32 width, int32 height)

filename IN:

Name of the file

image IN:

Pointer to the image array

width IN:

Number of columns in the image

height IN

Number of rows in the image

Purpose

Writes a 24-bit image to the specified file.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

DF24addimage appends a 24-bit raster image set to the file. Array image is assumed to be width x height x 3 bytes. In FORTRAN-77, the dimensions of the array image must be the same as the dimensions of the image data.

The order in which dimensions are declared is different between C and FORTRAN-77. Ordering varies because FORTRAN-77 arrays are stored in column-major order, while C arrays are stored in row-major order. (Row-major order implies that the last coordinate varies fastest).

When DF24addimage writes an image to a file, it assumes row-major order. The FORTRAN-77 declaration that causes an image to be stored in this way must have the width as its first dimension and the height as its second dimension. In other words, the image must be built "on its side".

FORTRAN

integer function d2aimg(filename, image, width, height)

character*(*) filename

<valid numeric data type> image

integer width, height



[Back to Interface] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.