I'm working with some biomedical images with more than 3 channels. The images are rather large so I'd prefer to store them as pyramidal TIFF files with JPEG compression. This gives an order of magnitude compression ratio compared to other compression schemes (eg. LZW, Deflate).
I'm currently using pyvips
's tiffsave
function to save these images. With other compression schemes, I can save images with arbitrary number of channels.
However, with JPEG compression, I've realized that the images saved can only have 1 or 3 channels.
If JPEG's algorithm can compress 1 channel, surely there must be ways to pack multiple JPEG compressed single channel images into one file?
Does anyone know a way to store n > 3 channel images into a single file with the following criteria?
- JPEG compression (or an algorithm with comparable performance)
- Easily viewable with GUI image viewing software (such as ImageJ)
- I really don't want to store each channel as a separate file.
- Images stored in pyramidal format
- Python 3