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:
If the data is unisigned, level shifting is applied subtracting 2^(bitdepth - 1)
Since it is not possible to know the input file byte-ordering before reading its header, this class can not be construct from a RandomAccessIO. So, the constructor has to open first the input file, to read only its header, and then it can create the appropriate BufferedRandomAccessFile (Big-Endian or Little-Endian byte-ordering).
NOTE: This class is not thread safe, for reasons of internal buffering.
@see jj2000.j2k.image.ImgData @see RandomAccessIO @see BufferedRandomAccessFile @see BEBufferedRandomAccessFile
|
|
|
|
|
|