Djpeglsd takes as input a file containing a grayscale image that was compressed with the old Lossless JPEG (JPEGLSD). Specifically the version that is included on the CDROMs with Special Databases 4, 9, 10, and 18. Once read into memory, the compressed pixmap is decoded and reconstructed to its original condition prior to compression. Cjpegl should be used for any future Lossless JPEG compression of images.
Upon completion, two different output image file formats are possible, a NIST IHead file (the default) or a raw pixmap file (specified by the -raw_out flag). In addition, a specially formatted text file, called a NISTCOM, is created with extension ".ncm". The NISTCOM file contains relevant image attributes associated with the decoded and reconstructed output image. If given a special database number, djpeglsd will put all the important class, sex, age, and file history information, that may exist for that database, in the NISTCOM file. (See NISTCOM OUTPUT below.)
All switch names may be abbreviated; for example, -raw_out may be written -r.
the extension of the decompressed output file. To construct the output filename, djpeglsd takes the input filename and replaces its extension with the one specified here.
the input JPEGLSD file to be decompressed.
Specify that the input image is from NIST Special Database #.
specifies that the decoded and reconstructed image should be stored to a raw pixmap file.
Upon successful completion, djpeglsd, creates a specially formatted text file called a NISTCOM file. A NISTCOM is a text-based attribute list comprised of (name, value) pairs, one pair per text line. The first line of a NISTCOM always has name = "NIST_COM" and its value is always the total number of attributes included in the list. These attributes are collected from information about the decompressed image. Detailed attributes are collected if the -sd # flag is used.
The NISTCOM output filename is constructed by combining the basename of the input JPEGLSD file with the extension ".ncm". By creating the NISTCOM file, relevant attributes associated with the decoded and reconstructed image are retained and easily accessed. This is especially useful when dealing with raw pixmap files and creating image archives. The following are example NISTCOMs generated by djpeglsd for SD9 and SD18 images (The highlighted items are attributes specific to that database.):
NIST_COM 12 SD_ID 9 HISTORY f0000771.pct ac/dm_fpw:20 tape9.n1125012.01 4096x1536 FING_CLASS W SEX f SCAN_TYPE i PIX_WIDTH 832 PIX_HEIGHT 768 PIX_DEPTH 8 PPI 500 LOSSY 0 COLORSPACE GRAY
NIST_COM 12 SD_ID 18 HISTORY f00117_1.pct SEX m AGE 26 FACE_POS f PIX_WIDTH 592 PIX_HEIGHT 448 PIX_DEPTH 8 PPI 500 LOSSY 0 COLORSPACE GRAY
From test/imgtools/execs/djpeglsd/djpeglsd.src:
% djpeglsd raw sd04.old -sd 4 -r % djpeglsd raw sd09.old -sd 9 -r % djpeglsd raw sd10.old -sd 10 -r % djpeglsd raw sd18.old -sd 18 -r decompresses JPEGLSD-encoded images from the Special Databases and stores the reconstructed images to a raw pixmap files. Note the NISTCOM files, sd04.ncm, sd09.ncm, sd10.ncm, and sd18.ncm, are also created.