OPJ_JP3D_COMPRESS(1)
π NAME π
okay so bestie, meet opj_jp3d_compress β she is a User Command and her entire job, her whole personality, is compressing a source file into a jp3d file. that's it. that's the gig. and she eats every single time π
β¨
β¨ SYNOPSIS β¨
opj_jp3d_compress [optional arguments] -i source.{bin, pgx} -m
characteristics.img -o destination.{jp3d}
like, you hand her a source, a characteristics file, and a destination, and she understands the assignment. no cap π«Ά
π OPTIONS π
πΈ Required Parameters (except with -h) πΈ
these ones? not optional. she needs them. periodt.
-iβ the source file, bestie. it's either-i source.binorsource*.pgxπ¦-mβ the source characteristics file, aka-m imgfile.imgπ-oβ where it all goes, aka the destination file:-o dest.jp3dπ
π Optional Parameters π
the fun little extras. mix and match, she's flexible π
-hβ shows you the help information. the girl literally explaining herself π-nβ number of resolutions (-n 3,3,3) β-Iβ uses the irreversible transforms: ICT + DWT 9-7 (-I) β irreversible, so yeah, that's a whole commitment π-Cβ the coding algorithm (-C 2EB) β options are [2EB, 3EB] π-rβ different compression ratios for successive layers (-r 20,10,5)
so the rate you specify for each quality level is the compression factor you want, and rate 1 means lossless compression. also, huge, crucial, do not skip: options -r and -q cannot be used together π«
-qβ different psnr for successive layers (-q 30,40,50)
and same energy: options -r and -q cannot be used together π
-bβ size of code block (-b 32,32,32) π§-cβ size of precinct (-c 128,128,128) πΈ-tβ size of tile (-t 512,512,512) π-pβ progression order (-p LRCP) β the lineup is [LRCP, RLCP, RPCL, PCRL, CPRL] π-sβ subsampling factor (-s 2,2,2), format [-s X,Y,Z]
heads up bestie: subsampling bigger than 2 can produce error. she said what she said π«£
-SOPβ writes an SOP marker before each packet β-EPHβ writes an EPH marker after each header packet β-Mβ code-block style (-M 0)
the menu is:
[1=BYPASS(LAZY) 2=RESET 4=RESTART(TERMALL) 8=VSC 16=PTERM
32=SEGSYM 64=3DCTXT]
and the way you indicate multiple modes is by adding their values together, like literally doing math in your head, for example: RESTART(4) + RESET(2) + SEGMARK(32) = -M 38 β¨ (yes SEGMARK, that's what the original says, iykyk)
-Dβ define DC offset (-D 12) π₯-xβ create an index file *.Idx (-x index_name.Idx) π-ROIβ c=%d,U=%d
so the quantization indices get upshifted for component c=%d where [%d = 0,1,2], with a value of U=%d where [0 <= %d <= 37]. example, since i know you want one: -ROI:c=0,U=25 π
-dβ offset of the origin of the volume (-d 150,300,100) π¦-lβ offset of the origin of the tiles (-l 100,75,25) π¦
π Default coding π
if you just⦠don't say anything? here's what she defaults to. no notes:
- Lossless π
- 1 tile
- Size of precinct: 2^15 x 2^15 x 2^15 (which means 1 precinct)
- Size of code-block: 64 x 64 x 64
- Number of resolutions in x, y and z axis: 3
- No SOP marker in the codestream
- No EPH marker in the codestream
- No sub-sampling in x, y or z direction
- No mode switch activated
- Progression order: LRCP
- No index file
- No ROI upshifted
- No offset of the origin of the volume
- No offset of the origin of the tiles
- Reversible DWT 5-3 on each 2D slice
- Coding algorithm: 2D-EBCOT
π« Remarks π«
the tea, the lore, the fine print π
The markers written to the main_header are: SOC SIZ COD QCD COM.
COD and QCD markers will never appear in the tile_header. never ever. she's not doing that π
bestie you need enough disk space memory (twice the original) to encode the volume, i.e. for a 1.5 GB volume you need a minimum of 3GB of disk memory. plan accordingly ππ
When loading .pgx files, a relative path to directory is needed for the input argument, followed by the common prefix of the slices and a '' character representing sequential numeration:
-i relativepath/slices*.pgx
The index file has the structure below:
Image_height Image_width Image_depth
Progression order: 0 (LRCP)
Tiles_size_X Tiles_size_Y Tiles_size_Z
Components_nb
Layers_nb
Decomposition_levels
[Precincts_size_X_res_Nr Precincts_size_Y_res_Nr
Precincts_size_Z_res_Nr]
...
[Precincts_size_X_res_0 Precincts_size_Y_res_0
Precincts_size_Z_res_0]
Main_header_end_position
Codestream_size
Tile_0 [start_pos end_header end_pos TotalDisto NumPix MaxMSE]
...
Tile_Nt [ '' '' '' '' '' '' ]
Tpacket_0 [Tile layer res. comp. prec. start_pos end_pos disto]
...
Tpacket_Np ['' '' '' '' '' '' '' '' ]
MaxDisto
TotalDisto
π AUTHOR π
This manual page was written by Mathieu Malaterre <malat@debian.org> and Hugo Lefeuvre <hle@debian.org> for the Debian GNU/Linux system, but may be used by others. icons, honestly, we love them for this π«Άπ
and that's the whole page bestie!! opj_jp3d_compress version 2.3.1, from way back in October 2019, filed under OPJ_JP3D_COMPRESS(1). slay, go compress something π
β¨πΈ
π¦ where this page comes from
- ubuntu jammy: libopenjp3d7 2.4.0-6 Β· BSD-2
- ubuntu jammy: libopenjp3d7 2.4.0-6ubuntu0.5 Β· BSD-2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms