Linux – Viewer for huge images under linux (>100 MP color images)

image-viewerimageslinux

I have a lot of 50-100 MP colour images that I would like to view on linux.

For example, 10000×17000 size is typical, but most image viewers will fail with out-of-memory.

The file format is png or jpg.

What I want is the ability to view such image in part and in whole, with the ability to scroll around the image. Low memory consumption, so no full image unpacked into bitmap in memory.

Best Answer

Gwenview

This is the default KDE image viewer. I just tried it on a 128-megapixel color JPEG (my OS is 32-bit). Gwenview loaded the image about 1 second.

  • It loads the image zoomed out initially. The process is using only 55.8 MB of memory, so clearly it hasn't loaded the full uncompressed image data.

  • At 100% zoom, it is quite snappy when I pan the image. The process is now using 520 MB of memory, which is slightly more than the 489 MB the uncompressed 32-bit image would take up.

However, with images of the size you described, loading the whole thing in memory is tractable on a recent computer. (The 32-bit addressing limit is 3 GB on Linux.)

ImageMagick

ImageMagick supports processing huge images without storing it all in memory.

To do this, use

display -limit memory 256mb huge_img.png

(replace 256mb with however much memory you want to use). ImageMagick will store the remainder of the pixel data on disk (/tmp/magick-12345678), so that it doesn't have to hold it all in memory.

It seems to be slower than Gwenview, but you might prefer it if you don't want to install all of Gwenview's KDE dependencies, or are heavily resource-constrained.

Related Question