opj_decompress(1)

💖 opj_decompress — the "converts jpeg2000 files" era 💖

okay bestie, sit DOWN, because this one is a whole ✨glow-up✨ machine for images. opj_decompress is the little icon that reads in a jpeg2000 image and converts it to another image type. It's part of the OpenJPEG library, so if you've got OpenJPEG energy in your life, this is the tool that gets your .j2k girlies out into the world. 🦋

Here's the tea on what it will and won't eat:

  • Valid input image extensions are .j2k, .jp2, .j2c, .jpt
  • Valid output image extensions are .bmp, .pgm, .pgx, .png, .pnm, .ppm, .raw, .tga, .tif

and lowkey important: for PNG resp. TIF it needs libpng resp. libtiff. no cap, if you don't have those libraries it's not gonna happen for you. 💀


🌈 SYNOPSIS 🌈

like, the three main ways you'll be calling her:

opj_decompress -i infile.j2k -o outfile.png
opj_decompress -ImgDir images/ -OutFor bmp
opj_decompress -h Print help message and exit
psst — See JPWL OPTIONS for special options 👀

✨ OPTIONS ✨

  • -i name — the jpeg2000 input file name, your source material 💅
  • -l n — n is the maximum number of quality layers to decode. (See LAYERS below — well, the section that's actually called TILES, but you'll see 👀)
  • -o name — output file name with extension, the glow-up destination 🎀
  • -r n — n is the highest resolution level to be discarded. (See REDUCTION below)
  • -x name — use name as index file and fill it
  • -ImgDir directory_name — directory containing input files, for when you're doing a whole batch at once
  • -OutFor ext — extension for output files

🛰️ JPIP OPTIONS 🛰️

these ones are only usable if the library has been compiled with BUILD_JPIP. so like, vibe check your build first, bestie.

  • -jpip — Embed index table box into the output JP2 file (compulsory for JPIP) 🔥
  • -TP R — Partition a tile into tile parts of different resolution levels (compulsory for JPT-stream)

🌸 JPWL OPTIONS 🌸

again, only usable if the library has been compiled with BUILD_JPWL. don't come for me if it's not there. 🙈

  • -W c[=Nc] — Nc is the number of expected components in the codestream; default:3
  • -W t[=Nt] — Nt is the maximum number of tiles in the codestream; default:8192
  • -W c[=Nc], t[=Nt] — same as above (both at once, she's versatile 💅)

🔍 REDUCTION 🔍

Set the number of highest resolution levels to be discarded. The image resolution is effectively divided by 2 to the power of the number of discarded levels. The reduce factor is limited by the smallest total number of decomposition levels among tiles.


🧩 TILES 🧩

Set the maximum number of quality layers to decode. If there are less quality layers than the specified number, all the quality layers are decoded.


👑 AUTHORS 👑

the legends, the icons, the main characters who made this happen:

  • Copyright (c) 2002-2014, Universite catholique de Louvain (UCL), Belgium
  • Copyright (c) 2002-2014, Professor Benoit Macq
  • Copyright (c) 2001-2003, David Janssens
  • Copyright (c) 2002-2003, Yannick Verschueren
  • Copyright (c) 2003-2007, Francois-Olivier Devaux and Antonin Descampe
  • Copyright (c) 2005, Herve Drolon, FreeImage Team
  • Copyright (c) 2006-2007, Parvatha Elangovan

🫶 SEE ALSO 🫶


and that's the whole page, bestie!! 🎀 this one is opj_decompress, Version 2.1.1 — the opj_decompress(1) manual, no cap. go convert something cute, you've got this. 💖✨🦋