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

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

For example, 10000x17000 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.


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.


The compressed jpgs may only be 50 meg but the pure raster would be about 700 meg. Given 32 bit OSs can only access 2 or 3 gigs of memory in a process ... With the OS load and the graphics program there may not be room.

The question is do the images tools you are using work with a raster internally. To do the windowed viewing the tools would need bit by bit access to the jpg data. I don't know if that is possible.

Can you try this on a 64 bit OS with 8 or 16 gig memory. If it works there then you know that they are expanding the jpg.