
# Images larger than the default thumbnail size (256x256 or # Get the large dimension of the input image NHeight="$(echo "$sSize" | cut -fields=2)" NWidth="$(echo "$sSize" | cut -fields=1)"
Copy the following script (based on the method from this) into the file (use Ctrl+ C to copy and Ctrl+ Shift+ V to paste into nano window):. Sudo nano /usr/local/bin/jp2-thumbnailer-bin Create a file named jp2-thumbnailer-bin in /usr/local/bin:. Xdg-mime query filetype ~/Pictures/example.j2kĬreate a thumbnailer script for JP2 and J2K images For example, if you have example.jp2 and example.j2k in ~/Pictures, issue these commands: xdg-mime query filetype ~/Pictures/example.jp2 In my case (Ubuntu 20.04), it's image/jp2 for JP2 images and image/x-jp2-codestream for J2K and J2C images.Īlternatively, you can use xdg-mime to get these mime-types. On the Basic tab, take note of what is in the parentheses for the Type field.
Right-click a JP2 or J2K image, select Properties.This package provides gdk-pixbuf-thumbnailer which will be used to resize the PNGs generated by opj_decompress to a more suitable size for thumbnails.
#Convert j2k to jpg install
If you are on Ubuntu 18.04 or later, you may have to install libgdk-pixbuf2.0-bin (which is usually pre-installed):. libopenjp2-tools is not available on Ubuntu 14.10 and earlier. This package comes with the tools and codecs needed to convert JP2 and J2K images to PNG thumbnails, namely opj_decompress, opj_dump, and libopenjp2-7. Install libopenjp2-tools sudo apt install libopenjp2-tools
Some methods for previewing JPEG-2000 images that work on Nautilus, Nemo, and Caja.