Image Structure Header
This header is included on any image type, and contains information of how the image is encoded inside the LRIT file.
|BitsPerPixel||uint8_t||How many BitsPerPixel the image has|
|Columns||uint16_t||Number of columns|
|Lines||uint16_t||Number of lines|
|CompressionType||uint8_t||Type of the Compression|
Table 5 - Image Structured Header Fields
The first three fields are straight forward to understand since they’re default image fields. They’re required since most of the images are RAW compressed images and the parser needs to know how to process them. BitsPerPixel defines how many bits each pixel has. Most images has 8 bits per pixel, meaning they’re gray scale images with every byte representing an pixel. For some images that might come as 24 bits per pixel meaning its (probably) a RGB 8bpp image, meaning each pixel contains three bytes, each one representing one color. The CompressionType field defines which type of compression is used to store the image. The table below shows the possible types.
|0||No Compression (raw)|
|1||Goloumb Rice (LRIT Rice)|
Table 6 - CompressionType ENUM
For JPEG / GIF / ZIP compression types it is possible to just dump the entire Data Section of the LRIT file and process it as a normal JPEG / GIF / ZIP file. The relay stations doesn’t remove any headers and the Data section is a normal file. Actually OpenSatelliteProject does that when the Compression Type field is any of these three values.
For Goloumb Rice (know in NOAA libraries as LritRice) the output is a RAW image data that should be processed acording to the fields BitsPerPixel, Columns, Lines. More details about the compression is described at Rice Compression Record, that will always come when Compression Type field is LRIT RICE.