<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
                   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
<!-- lifted from troff+man by doclifter -->
<refentry id='djpeglsd1'>
<!--  @(#)djpeglsd.1 2001/04/02 NIST -->
<!--  I Image Group -->
<!--  Craig Watson and Michael D. Garris -->

<refmeta>
<refentrytitle>DJPEGLSD</refentrytitle>
<manvolnum>1D</manvolnum>
<refmiscinfo class='date'>02 April 2001</refmiscinfo>
<refmiscinfo class='source'>NIST</refmiscinfo>
<refmiscinfo class='manual'>NFIS Reference Manual</refmiscinfo>
</refmeta>
<refnamediv id='name'>
<refname>djpeglsd</refname>
<refpurpose>decompresses a grayscale image that was compressed using the old Lossless JPEG compression distributed with Special Databases 4, 9, 10, and 18. Cjpegl should be used in the future to Lossless JPEG (JPEGL) compress images.</refpurpose>
</refnamediv>
<!-- body begins here -->
<refsynopsisdiv id='synopsis'>
<cmdsynopsis>
  <command>djpeglsd</command>    
    <arg choice='plain'><replaceable>&lt;outext&gt;&lt;imagefile&gt;</replaceable></arg>
    <arg choice='opt'>-sd <replaceable>#</replaceable></arg>
    <arg choice='opt'>-raw_out </arg>
    <sbr/>
</cmdsynopsis>
</refsynopsisdiv>


<refsect1 id='description'><title>DESCRIPTION</title>
<para><emphasis remap='B'>Djpeglsd</emphasis>
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.
<emphasis remap='B'>Cjpegl</emphasis> should be used for any future Lossless JPEG compression
of images.</para>

<para>Upon completion, two different output image file formats are possible,
a NIST IHead file (the default) or a raw pixmap file (specified by the
<option>-raw_out</option> 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,
<command>djpeglsd</command> 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.)</para>

</refsect1>

<refsect1 id='options'><title>OPTIONS</title>
<para>All switch names may be abbreviated; for example,
<option>-raw_out</option> may be written <option>-r</option>.</para>
<variablelist remap='TP'>
  <varlistentry>
  <term><emphasis remap='I'>&lt;outext&gt;</emphasis></term>
  <listitem>
<para>the extension of the decompressed output file.
To construct the output filename, <command>djpeglsd</command> takes the
input filename and replaces its extension with the one
specified here.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><emphasis remap='I'>&lt;image file&gt;</emphasis></term>
  <listitem>
<para>the input JPEGLSD file to be decompressed.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>-sd #</option></term>
  <listitem>
<para>Specify that the input image is from NIST Special Database #.</para>
  </listitem>
  </varlistentry>
  <varlistentry>
  <term><option>-raw_out</option></term>
  <listitem>
<para>specifies that the decoded and reconstructed image should be
stored to a raw pixmap file.</para>

  </listitem>
  </varlistentry>
</variablelist>
</refsect1>

<refsect1 id='nistcom_output'><title>NISTCOM OUTPUT</title>
<para>Upon successful completion, <command>djpeglsd</command>, 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 <option>-sd #</option> flag is used.</para>

<para>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 <command>djpeglsd</command> for SD9 and
SD18 images (The highlighted items are attributes specific to
that database.):</para>

<!-- .RS -->
<para>NIST_COM 12
<!-- .br -->
<emphasis remap='B'>SD_ID 9</emphasis>
<!-- .br -->
<emphasis remap='B'>HISTORY f0000771.pct ac/dm_fpw:20 tape9.n1125012.01 4096x1536</emphasis>
<!-- .br -->
<emphasis remap='B'>FING_CLASS W</emphasis>
<!-- .br -->
<emphasis remap='B'>SEX f</emphasis>
<!-- .br -->
<emphasis remap='B'>SCAN_TYPE i</emphasis>
<!-- .br -->
PIX_WIDTH 832
<!-- .br -->
PIX_HEIGHT 768
<!-- .br -->
PIX_DEPTH 8
<!-- .br -->
PPI 500
<!-- .br -->
LOSSY 0
<!-- .br -->
COLORSPACE GRAY</para>
<!-- .br -->
<!-- .br -->

<para>NIST_COM 12
<!-- .br -->
<emphasis remap='B'>SD_ID 18</emphasis>
<!-- .br -->
<emphasis remap='B'>HISTORY f00117_1.pct</emphasis>
<!-- .br -->
<emphasis remap='B'>SEX m</emphasis>
<!-- .br -->
<emphasis remap='B'>AGE 26</emphasis>
<!-- .br -->
<emphasis remap='B'>FACE_POS f</emphasis>
<!-- .br -->
PIX_WIDTH 592
<!-- .br -->
PIX_HEIGHT 448
<!-- .br -->
PIX_DEPTH 8
<!-- .br -->
PPI 500
<!-- .br -->
LOSSY 0
<!-- .br -->
COLORSPACE GRAY</para>
<!-- .br -->

</refsect1>

<refsect1 id='examples'><title>EXAMPLES</title>
<para>From <emphasis remap='I'>test/imgtools/execs/djpeglsd/djpeglsd.src</emphasis>:</para>
<!-- .RS -->

<para><emphasis remap='B'>% djpeglsd raw sd04.old -sd 4 -r</emphasis>
<!-- .br -->
<emphasis remap='B'>% djpeglsd raw sd09.old -sd 9 -r</emphasis>
<!-- .br -->
<emphasis remap='B'>% djpeglsd raw sd10.old -sd 10 -r</emphasis>
<!-- .br -->
<emphasis remap='B'>% djpeglsd raw sd18.old -sd 18 -r</emphasis>
<!-- .br -->
decompresses JPEGLSD-encoded images from the Special Databases
and stores the reconstructed images to a raw pixmap files.  Note the
NISTCOM files, <emphasis remap='B'>sd04.ncm</emphasis>, <emphasis remap='B'>sd09.ncm</emphasis>, <emphasis remap='B'>sd10.ncm</emphasis>, and
<emphasis remap='B'>sd18.ncm</emphasis>, are also created.</para>

</refsect1>

<refsect1 id='see_also'><title>SEE ALSO</title>
<para><emphasis remap='B'>cjpegl</emphasis>(1D),
<emphasis remap='B'>djpegl</emphasis>(1D),
<emphasis remap='B'>dpyimage</emphasis>(1D),</para>

</refsect1>

<refsect1 id='author'><title>AUTHOR</title>
<para>NIST/ITL/DIV894/Image Group</para>
</refsect1>
</refentry>

