DBReadLine()

  DBReadLine and DBWriteLine

Description

DBReadLine() is used to read a portion of an image scanline into a variable.

Call Signature

void DBReadLine ( int/string filespec, int channel_num, int y_offset, int x_offset, int x_size, any ptr buffer )

Return Value

void

This has no return value.

Arguments

int/string filespec:

This can either be the handle returned by DBOpen(), or the name of an open file.

int channel_num:

The channel number of the image data to return.

int y_offset:

Y offset to the desired scanline. This is zero for the very first scanline on the database.

int x_offset:

X offset to the first desired pixel on the requested scanline. This is zero for the very first pixel on the scanline.

int x_size:

The number of pixels to fetch from the X offset point in the scanline.

any ptr buffer:

An array of bytes, integers, or floats large enough to receive the requested number of pixels.

Remarks

DBReadLine() and DBWriteLine() allow direct access to imagery stored on image databases.

Note: This does not have the power and convenient abilities of the MODEL statement.

The requested pixel values are fetched and assigned to the passed buffer. The pixel values will be promoted/demoted to the type of the buffer according to the usual rules. The x_offset plus the x_size values must total, at most, the number of pixels in the database. Similarly, the y_offset value should be, at most, the number of scanlines minus one. The y_size is always implicitly one, indicating that only one scanline may be fetched at a time.

See also

GDB file functions

DBWriteLine()

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.