Reads a24-bit image file.
XSize The width (size in the x-direction) of imgarr. The width is computed and returned in XSize if imgarr is not explicitly dimensioned. XSize is returned as an integer.
YSize The height (size in the y-direction) of imgarr. The height is computed and returned in YSize if imgarr is not explicitly dimensioned. YSize is returned as an integer.
When choosing the value for the Org keyword, be sure to select an organization that matches the file, even if it is the opposite of that used in the variable. In other words, if the data in the file is pixel interleaved, specify Org=0, and if the data is image interleaved, specify Org=1.
The way the data is read into the variable depends primarily on the dimensions that the variable was given when it was created. Consequently, an image interleaved file can be read into a pixel interleaved variable, and vice versa. So, if you want the data in the variable organized differently than it was organized in the file, pre-dimension the import variable before calling DC_READ_24_BIT. Dimension the variable with a width w and a height h that matches those shown in the table later in this section.
Image Width | Image Height | Image Depth |
---|---|---|
640 | 480 | 3 |
640 | 512 | 3 |
128 | 128 | 3 |
256 | 256 | 3 |
512 | 512 | 3 |
1024 | 1024 | 3 |
PV-WAVE uses the following guidelines to dimension imgarr:
NOTE: You do not need to explicitly dimension imgarr, but if your image data is not one of the standard sizes (e.g., 3-by-512-by-512 or 640-by-480-by-3), you will get more predictable results if you dimension imgarr yourself.
harpoon.img
contains a 786432 byte 24-bit image-interleaved image, the function call:
status = DC_READ_24_BIT('harpoon.img', $ H24_image, Org=1, XSize=xdim, YSize=ydim)
harpoon.img
, creates a 512-by-512-by-3 image-interleaved byte array named H24_image
, and returns xdim
and ydim
as 512.
Windows Users: For an example showing how to use DC_READ_FREE to import data from a Microsoft Excel spreadsheet, see the PV-WAVE Programmer's Guide.