RAWNJL2(1)

NAME
rawnjl2 - JPEG-LS compress/decompress from raw file

SYNOPSIS

rawnjl2 -rows|-height|-h rows -columns|-width|-w cols -bits|-depth bits [ -d|-decompress ] [ -near n ] [ -T1|-Ta n ] [ -T2|-Tb n ] [ -T3|-Tc n ] [ -reset n ] [ -nomarkers ] [ -noruns ]

DESCRIPTION

rawnjl2 either reads the named raw input file and compresses it per the JPEG-LS (ISO DIS 14495-1) standard, or reads a compressed file and decompresses it into a raw output file (when the -d option is specified).

The default compression is lossless, though near-lossless compression can be selected by specifying a pixel value error with the -near option.

OPTIONS
Error messages go to standard error.

Options specific to this program are:

-rows|-height|-h rows
    Required for compression.

-columns|-width|-w cols
    Required for compression.

-bits|-depth|-d bits
    Required for compression.

-d|-decompress
    Selects decompression rather than compression (the default).

-near n
    If not zero (the default), selects near-lossless compression. The value specified is the amount of error allowed in the reconstructed pixel value realtive to the original pixel value.

-T1|-Ta n

-T2|-Tb n

-T3|-Tc n

-reset n
    Specify values other than the defaults for various compression parameters (see the standard for explanation).

-nomarkers
    Turns off writing (and reading) JPEG markers in the compressed output. Useful for examining the coompressed bitstream, though zero bit stuffing after 0xff bytes is still performed (and expected on decompression). Implies that the image parameters and non-default compression parameters need to be specified on the command line during decompression.

-noruns
    Turns off run mode during compression (and also needs to be specified for decompression). Thgis creates a non-standard bitstream bit is interesting to test the additional effectiveness the low entropy (less than one bit per pixel) run mode.

ENVIRONMENT

EXAMPLES

% rawnjl2 -h 4 -e 4 -bits 8 -input-endian little 1.raw 1.jls
% rawnjl2 -d -output-endian little 1.jls 1.cmp
% cmp 1.raw 1.cmp

FILES

SEE ALSO

http://www.jpeg.org/

AUTHOR
Copyright (c) 1993-2015, David A. Clunie DBA PixelMed Publishing. All rights reserved.

BUGS
The near-lossless mode may trigger a bug that cause mapped error values to go negative and lead to a failed assertion. The standard seems unlcear on this point.

The compressed datastream does not seem to match the HP LOCO 0.90 implementation for some images, though the tiny example file in the standard compresses to match the standard and the HP implementation.