This class extends the ImgWriter abstract class for writing PGX files. PGX is a custom monochrome file format invented specifically to simplify the use of VM3A with images of different bit-depths in the range 1 to 31 bits per pixel.
The file consists of a one line text header followed by the data.
Header: "PG"+ ws +<endianess>+ ws +[sign]+ws + <bit-depth>+" "+<width>+" "+<height>+'\n'
where:
- ws (white-spaces) is any combination of characters ' ' and '\t'.
- endianess equals "LM" or "ML"(resp. little-endian or big-endian)
- sign equals "+" or "-" (resp. unsigned or signed). If omited, values are supposed to be unsigned.
- bit-depth that can be any number between 1 and 31.
- width and height are the image dimensions (in pixels).
Data: The image binary values appear one after the other (in raster order) immediately after the last header character ('\n') and are byte-aligned (they are packed into 1,2 or 4 bytes per sample, depending upon the bit-depth value).
If the data is unsigned, level shifting is applied adding 2^(bit depth - 1)
NOTE: This class is not thread safe, for reasons of internal buffering.
@see ImgWriter
@see BlkImgDataSrc