5

I've been working with batches of JPEG 2000 (.jp2) files recently. This would be much more convenient if I had an image viewer capable of displaying JPEG 2000 images instead of having to convert them to TIF files to see their content.

From what I've seen, no image viewing or photo management software found in the Ubuntu 20.04 repositories supports JPEG 2000 files, presumably due to potential patent issues with the format. The version of GIMP provided in 20.04 is capable of natively opening JPEG 2000 files, but it's a full-blown image editor and not fast/convenient enough replacement for an image viewer.

What ways are there of getting a J2K-capable image viewer on Ubuntu 20.04.1? I'd like to avoid Snaps and unofficial PPAs if at all possible. I'm willing to build stuff from source if it's necessary (I'm assuming it will be in this situation), but would like to avoid having to also build a long list of dependencies. Building with only JPEG 2000 support would be OK too, since I'll probably set this viewer to only open .jp2 files.

I'm only interested in FOSS software.

3
  • Take a look at geeqie which also exists in the Ubuntu repos. While in 20.04 it it does not support jp2, it does in 20.10. Maybe worth a try.
    – mook765
    Commented Feb 25, 2021 at 10:55
  • I manually downloaded and installed the geeqie-common and geeqie packages from the 20.10 repositories and it works. It's a bit sluggish at actually opening/decoding .jp2 files and not the best image viewer I've ever used, but it does work. If you want to post this as an answer, I'll select it as the solution.
    – veikk0
    Commented Feb 25, 2021 at 15:08
  • You might be interested in creating thumbnails for JP2 & J2K images
    – Calico Cat
    Commented Oct 12, 2021 at 11:48

3 Answers 3

4

I stumbled upon the package geeqie while checking the reverse dependencies of the package libopenjp2-7 on Ubuntu 20.10.

Unfortunately in Ubuntu 20.04 Geeqie does not depend on this package and therefor will not support jp2-files.

But you can try to install newer version of Geeqie, here you'll find detailed information about how to do that.

Alternatively you could try to manually download and install the packages geeqie and geeqie-common from the 20.10-repository.

0
2

Surprisingly, ffmpeg converts jpeg2000 images to a more usable format, for example:

ffmpeg -i image.jp2 image.jpg

The nice thing about that is, being a commandline program I can convert hundreds of images quickly and automatically, and resize them, or perform other operations on them, with ImageMagick, and of course, display them with virtually any image viewer. I know this is an unsatisfying solution.

I spent a while trying to get ImageMagick to delegate to OpenJPEG's jpeg2000 converter, so that I could use ImageMagick's display program to show them directly, but I failed. I'm still not sure why, but compiling/installing openjpeg-2.3.0 gave me, among other things, opj_decompress, which let me convert jpg2 files. Unfortunately it only lets me convert to png, pnm, pgm, ppm, pgx, bmp, tif, raw, or tga. Not jpg. For example:

opj_decompress -i image.jp2 -OutFor PNG -o image.png

Other programs it installs are opj_compress and opj_dump

Hope this helps.

0

This is possible by any image viewer which uses openjpeg2 library.

Possible candidate is DarkTable from darktable package .

1
  • There isn't a single image viewer in Ubuntu repositories that uses libopenjpeg. That's why I asked this question. As for Darktable, I tried to import some images just now and it filled my RAM in just a few seconds. So that's a no go.
    – veikk0
    Commented Feb 24, 2021 at 9:37

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .