Welcome, Guest! Log In | Create Account

Djatoka Applications

From djatoka

Jump to: navigation, search

Contents

Compression

Linux/UNIX: ./bin/compress.sh

Windows: .\bin\compress.bat

Usage: gov.lanl.adore.djatoka.DjatokaCompress
 -a,--AltImpl <arg>       Alternate ICompress Implemenation
 -b,--Cblk <arg>          Codeblock Size
 -c,--Cprecincts <arg>    Precinct dimensions
 -d,--Corder <arg>        Progression order
 -g,--ORGgen_plt <arg>    Enables insertion of packet length information
                          in the header
 -i,--input <arg>         Filepath of the input file or dir.
 -l,--Clevels <arg>       Number of DWT levels (resolution levels).
 -o,--output <arg>        Filepath of the output file or dir.
 -p,--props <arg>         Compression Properties File
 -r,--rate <arg>          Absolute Compression Ratio
 -s,--slope <arg>         Used to generate relative compression ratio
                          based on content characteristics.
 -t,--ORGtparts <arg>     Division of each tile's packets into tile-parts
 -v,--Creversible <arg>   Use Reversible Wavelet
 -y,--Clayers <arg>       Number of quality levels.

Compression Properties

Examples

  • Use default djatoka properties to compress a single image
    • ./compress.sh -i /mnt/images/tiff/12345.tif -o /mnt/images/jp2/12345.jp2
  • Use default djatoka properties to compress a directory of images
    • ./compress.sh -i /mnt/images/tiff/ -o /mnt/images/jp2/
  • Override djatoka properties and compress a directory of images
    • ./compress.sh -i /mnt/images/tiff/ -o /mnt/images/jp2/ -p ../etc/djatoka.properties

Extraction

Linux/UNIX: ./bin/extract.sh

Windows: .\bin\extract.bat

Usage: gov.lanl.adore.djatoka.DjatokaExtract
 -a,--AltImpl <arg>   Alternate IExtract Implemenation
 -c,--cLayer <arg>    Compositing Layer Index, starting at 0.
 -d,--reduce <arg>    Resolution levels to subtract from max resolution.
 -f,--format <arg>    Mimetype of the image format to be provided as
                      response. Default: image/jpeg
 -i,--input <arg>     Filepath of the input file.
 -l,--level <arg>     Resolution level to extract.
 -o,--output <arg>    Filepath of the output file.
 -r,--region <arg>    Format: Y,X,H,W.
 -s,--scale <arg>     Format: Option 1. Define a long-side dimension (e.g.
                      96); Option 2. Define absolute w,h values (e.g. 1024,768); Option 3.
                      Define a single dimension (e.g. 1024,0) with or without Level Parameter;
                      Option 4. Use a single decimal scaling factor (e.g. 0.854)
 -t,--rotate <arg>    Number of degrees to rotate image (i.e. 90, 180, 270).

Examples

  • Extract 12345.jp2 at max resolution as a JPEG
    • ./extract.sh -i /mnt/images/jp2/12345.jp2 -o /mnt/images/out/12345.jpg
  • Extract 12345.jp2 at Level 4 as a PNG
    • ./extract.sh -i /mnt/images/jp2/12345.jp2 -o /mnt/images/out/12345.png -f image/png -l 4
  • Extract a sub-region of 12345.jp2 at Level 5
    • ./extract.sh -i /mnt/images/jp2/12345.jp2 -o /mnt/images/out/12345.jpg -l 5 -r 1024,1024,256,256
  • Extract a 1024px long-side JPEG from 12345.jp2
    • ./extract.sh -i /mnt/images/jp2/12345.jp2 -o /mnt/images/out/12345.jpg -s 1024