Supported formats
PDS3
pds2img reads the first IMAGE object in the label, searching nested OBJECT / GROUP blocks.
Label syntax
Values that span several lines (strings and lists) are joined. Parsing stops at END, so attached labels can be parsed from the whole file.
IMAGE keywords
^IMAGE pointer
SAMPLE_TYPE
- Signed integers:
MSB_INTEGER,LSB_INTEGER,SUN_INTEGER,MAC_INTEGER,PC_INTEGER,VAX_INTEGER - Unsigned integers:
UNSIGNED_INTEGER,MSB_UNSIGNED_INTEGER,LSB_UNSIGNED_INTEGER,PC_UNSIGNED_INTEGER,VAX_UNSIGNED_INTEGER, … - IEEE reals:
IEEE_REAL,MSB_REAL,PC_REAL,LSB_REAL
Types containing LSB, PC_ or VAX_ are read as little-endian. All others are big-endian.
Not supported
VAX floating point (VAX_REAL), multi-band images (BANDS > 1; only the first band is read), and compressed products such as .IMQ are not supported.
PDS4
pds2img reads the first Array_2D_Image in the label.
data_type
The axis order is assumed to be Last Index Fastest (samples within a line are contiguous), which is the PDS4 default. Special_Constants are not applied.
Output
toPNG and toTIFF write 16-bit grayscale images with no compression:
- the finite min/max of the calibrated pixels is mapped linearly to
0…65535 NaNand±Infinitypixels are written as0- a constant image is written as all zeros
- PNG is big-endian with stored (uncompressed) DEFLATE blocks; TIFF is little-endian (
II) with a single strip