This cheat sheet lists encoder parameter names (exact strings used by ParameterList), short synopsis, and defaults where available. The encoder recognizes the same option names used historically in JJ2000/CSJ2K; use them exactly as keys in a ParameterList.
Usage example (C#):
var p = new ParameterList();
p["rate"] = "0.5"; // set target bitrate (bpp)
byte[] j2k = J2kImage.ToBytes(bitmap, p);debug— on|off — Print debugging messages. Default:off.disable_jp2_extension— on|off — Disable automatic.jp2extension whenfile_formatis used. Default:off.file_format— on|off — Wrap codestream in JP2 file format. Default:on.pph_tile— on|off — Pack packet headers into tile headers. Default:off.pph_main— on|off — Pack packet headers into main header. Default:off.pfile— — Load arguments from file. Default:null.tile_parts— — Packets per tile-part. Default:0.tiles— — Nominal tile dimensions. Default:0 0(no tiling).ref— — Image origin in canvas system. Default:0 0.tref— — Tile partition origin. Default:0 0.rate— — Output bitrate in bits-per-pixel;-1means lossless/no discard. Default:-1.lossless— on|off — Turn on lossless compression (reversible quantization + w5x3). Default:off.i— <image file(s)> — Input image(s) (PGM/PPM/PGX). Mandatory for low-level flow.o— — Output filename (mandatory for CLI encoding). For library use,ToBytesreturns bytes.verbose— on|off — Print encoding info. Default:on.v— on|off — Print version/copyright. Default:off.u— on|off — Print usage. Default:off.
tiles—"W H"— Nominal tile width and height, e.g."1024 1024".tile_parts— integer — Max packets per tile-part (0 = all in first tile-part).pph_tile,pph_main— on|off — Packed packet headers (tile/main).Psop,Peph— on|off — Use Psop/Peph markers (packet header / end-of-packet header).
Source: ForwardWT.ParameterInfo
Wlev— — Number of wavelet decomposition levels. Default:5.Wwt—[full]— Wavelet transform mode. Default:full.Wcboff—<x y>— Code-block partition origin (0 or 1). Default: must be provided (default in usage:0 0).
Note: Wcboff is required by the forward transform instance creation in the encoder code; typical value: "0 0".
Source: AnWTFilter.ParameterInfo
Ffilters—[<tile-component idx>] <id>— Specifies analysis wavelet filters (e.g."w5x3"or"w9x7").- Default: depends on
lossless/ quantization type;w5x3for reversible,w9x7for non-reversible.
- Default: depends on
Source: ForwCompTransf.ParameterInfo
Mct—[<tile index>] [on|off] ...— Multiple component transform (RCT/ICT). Values:on/off,rct/ictin per-tile contexts.- Default: not specified (encoder picks
rctorictdepending on filters andlossless).
- Default: not specified (encoder picks
Source: Quantizer.ParameterInfo
Qtype—[<tile-component idx>] <id>— Quantization type:reversible,derived,expounded.- Default: depends on
losslessflag and other defaults.
- Default: depends on
Qstep—[<tile-component idx>] <bnss>— Base normalized quantization step size (ignored in reversible). Default:0.0078125.Qguard_bits—[<tile-component idx>] <gb>— Number of guard bits. Default:2.
Source: PostCompRateAllocator.ParameterInfo
Alayers—[<rate> [+<layers>] ... | sl]— Explicit layers specification. Default example in source:"0.015 +20 2.0 +10".Aptype— progression order:res,layer,res-pos,pos-comp,comp-pos(or complex POC syntax). Default: depends onRroi/ other options; typical default islayer.
Notes: Alayers uses internal syntax (rates and optional +<layers>). See code comments in PostCompRateAllocator for parsing rules.
- Progression/poc options are handled via
Aptypeand related POC syntax. - Entropy/packet options:
Clen_calc,Cterm_type,Cseg_symboletc. — configured via encoder specs; seeEncoderSpecsand the specificModuleSpecclasses in code.
CoreJ2K/J2kImage.cs—encoder_pinfo(general encoder options)CoreJ2K/j2k/wavelet/analysis/ForwardWT.cs—Woptions (Wlev,Wwt,Wcboff)CoreJ2K/j2k/wavelet/analysis/AnWTFilter.cs—FfiltersCoreJ2K/j2k/image/forwcomptransf/ForwCompTransf.cs—MctCoreJ2K/j2k/quantization/quantizer/Quantizer.cs—Qtype,Qstep,Qguard_bitsCoreJ2K/j2k/entropy/encoder/PostCompRateAllocator.cs—Alayers,Aptype
Use those files as the canonical source of parameter names and default values.
- Lossy, JP2 wrapped, tiled 1024×1024, 5-level WT at 0.5 bpp
var p = new ParameterList();
p["rate"] = "0.5";
p["file_format"] = "on";
p["tiles"] = "1024 1024";
p["Wlev"] = "5";
var bytes = J2kImage.ToBytes(bitmap, p);- Lossless JP2
var p = new ParameterList();
p["lossless"] = "on";
p["file_format"] = "on";
var bytes = J2kImage.ToBytes(bitmap, p);