Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

DoRaster(3D)

DoFileRaster(3D)

DsInqRaster(3D)

DsFileRasterRead(3D)  —  Kubota Pacfic Computer Inc. (\*(Dd)

NAME

DsFileRasterRead − Read raster information from a file

SYNOPSIS

C:

DtInt DsFileRasterRead(filename, width, height, depth,
type, data)
DtPtr filename;
DtInt ∗width;
DtInt ∗height;
DtInt ∗depth;
DtRasterType ∗type;
DtPtr ∗data;

FORTRAN:

INTEGER∗4 DSFRSR(FILENM, FLEN, WIDTH, HEIGHT,
DEPTH, TYPE, DATA)
INTEGER∗4 FLEN
CHARACTER∗FLEN FILENM
INTEGER∗4 WIDTH
INTEGER∗4 HEIGHT
INTEGER∗4 DEPTH
INTEGER∗4 TYPE
INTEGER∗4 DATA

DESCRIPTION

DsFileRasterRead reads raster information from a file.  This information can be used to create a raster object with DoRaster <DORS>. 

The parameter filename is the name of the file containing the raster data.  The file can contain information for a one-, two- or three-dimensional raster.  The return parameters width, height, and depth are the dimensions of the raster. 

The return parameter type indicates the type and format of the information being extracted.  Possible values for type are:

DcRasterRGB <DCRRGB>
Each point in the raster has red, green and blue information.

DcRasterRGBA <DCRRA>
Each point in the raster has red, green, blue and alpha information.

DcRasterRGBAZ <DCRRAZ>
Each point in the raster has red, green, blue, alpha and z information.

DcRasterRGBZ <DCRRZ>
Each point in the raster has red, green, blue and z information.

DcRasterA <DCRA>
Each point in the raster has alpha information.

DcRasterABGR <DCRAR>
Each point in the raster has alpha, blue, green, and red information.

DcRasterZ <DCRZ>
Each point in the raster has z information.

The return parameter data is a pointer to the extracted raster data.  DsFileRasterRead will allocate the space for the data, but it is up to the application to deallocate the space when the data is no longer needed, for example through the delete callback mechanism of DoRaster <DORS>. 

DsFileRasterRead returns -1 if an error occurs (see below), otherwise DsFileRasterRead returns 0. 

FORTRAN SPECIFIC

The parameter FILENM is a filename FLEN characters long. 

ERRORS

DsFileRasterRead will fail if the file is not a standard Doré raster file. 

[WARNING - value out of range. ’rastertype’ required as first attribute ]

DsFileRasterRead will fail if the file cannot be opened. 

[WARNING - io error.  Could not open file filename ]

SEE ALSO

DoRaster(3D), DoFileRaster(3D), DsInqRaster(3D)

September 02, 1992

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