File Size Limitations for Panoramas
I’ve been working with some very large 5+ gigapixel panoramas lately. I thought I’d share a few things I’ve learned while dealing with such large images that might help other panoramic photographers struggling with poorly documented limitations of various file types and their compatibility between common applications.
Photoshop & Lightroom
Applications and file formats both have their own set of limitations when it comes to pixel dimensions and file sizes. Let’s talk about application limitations first. Photoshop internally supports a maximum image size of 300,000 x 300,000 pixels or 90 gigapixels (assuming you have enough RAM!), but very few file types support this insane size. Lightroom is a lot more restrictive at 65,535 pixels along the greatest side. Lightroom also has a silly limitation of 512 megapixels for an image regardless of the longest side, which makes things very frustrating for a panoramic photographer. For example: 32,000 x 16,000 is the largest 2:1 equirectangular spherical panorama you can work on in Lightroom and fit under 512 megapixels. This is probably a limitation of Camera RAW, the engine underneath Lightroom’s hood. Other programs will have their own image size limitations. Sometimes it is confusing to figure out what is a program limitation and what is a file format limitation. Let’s go over a few common file formats and their limitations—keep in mind that a file format might be able to hold a larger image than your program can read.
DNG is Adobe's Digital Negative format for RAW files. It supports both lossy and lossless compression and up to 32-bit floating point. Adobe makes a DNG Converter to convert camera manufacturer-specific RAW formats into DNG format. I usually stay with the manufacturer's native RAW format, but Lightroom 6+ can merge panoramas and HDR images into DNG format (sadly, no batching feature yet), preserving the RAW data for easier editing later, such as adjusting white balance. I can't find any specified maximum image size or file size for the DNG format in Adobe's documentation, but Camera RAW will limit you to 512MP anyway. Seitz RAW Converter for their Roundshot cameras lists a maximum of 4GB for their DNG files, so the file format is capable of much larger images than Photoshop's own Camera RAW engine.
TIFF files don’t appear to have a pixel or resolution limit that I can find, but they do have a 4GB file size limit. TIFF files support multiple layers and 8-bits, 16-bits, or 32-bits per color channel. Lightroom 4 and newer can now read 32-bit TIFFs and multiple layers, though it will only see the final top layer and any transparencies to layers underneath (i.e. the top rendered image you see in Photoshop), you cannot interact with the layers in Lightroom. TIFF files support ZIP and LZW compression for smaller file sizes. ZIP compression is more efficient than LZW compression with 16-bit and 32-bit files resulting in smaller file sizes, but it is also more CPU intensive and slower to open and save than LZW. Layers can also support ZIP compression. Often LZW results in LARGER file sizes for me than no compression at all with anything over 8-bits per channel. I use ZIP compressed TIFFs for the majority of my storage. Consider that more layers means larger file sizes and more difficulty staying under 4GB for large-dimension images or lots of layers. If you use ZIP compression on both the image and layers when saving from Photoshop, you can fit quite a large amount of data under the 4GB file size limit. I usually work in PSB format temporarily to save quicker while working, and export my final image as a ZIP compressed TIFF to read in Lightroom, as it takes significantly more CPU time to compress the image each time you save, but it is lossless compression and good for archiving.
BigTIFF is a relatively new file format to get around the 4GB limitation of TIFF files; it has no practical file size limitation. Photoshop CS6 and newer can read them, but not write them, and Lightroom can’t do either. Some panorama tools can read/write this format. I find it to be of little use until there is more application support for it.
PSD is Photoshop’s older native file format and with a 2GB limit it is even more restrictive than TIFF so I rarely use it. It also has a maximum height and width of 30,000 pixels. I usually use TIFF for better compatibility between programs. Photoshop can read a 32-bit PSD file, but Lightroom cannot. Lightroom can read 8-bit and 16-bit PSDs, but only the top layer and any transparencies to layers beneath (just like TIFF above). In many ways TIFF files are better than Photoshop’s native PSD file format. I’ve yet to find an advantage for PSD over TIFF with newer versions of Photoshop and Lightroom.
PSB is my favorite format for very large panoramas. It’s a newer version of PSD without the file size limitation, in fact it supports files much larger than Photoshop’s own maximum image size (I’ll mention how to split these up for Photoshop to handle in a bit). I’ve created 3TB PSB files before with multiple layers and Photoshop handled them OK (given a huge swap file and lots of RAM obviously). Lightroom can’t read PSB files which isn’t a big deal since it can’t handle more than 512 megapixels anyway. I keep my original panoramas in PSB format if they are larger than 4GB TIFFs can handle, and save a smaller 512 megapixel TIFF for Lightroom if I want cataloging, keywording, exporting to social media, etc.
JPEGs have a limitation of 65,535 × 65,535 or almost 4.3 gigapixels regardless of compression, support 8-bits per channel only, and are typically sRGB color space. They are also lossy compression, even at 100% quality. I never use JPEGs for source material or archiving, but they are perfect for final display on an iPad, web browser, email, etc. I can’t find any visible difference in quality between 92% and 100% when exporting from Lightroom, but there is a significant file size difference. The same with Photoshop and a quality setting of about 10 or 11. Martin Bailey and Jeffrey Friedl both have done more extensive tests than I on that topic though if you look them up. I use a program called JPEGmini Pro to do my JPEG compression on the fly for each export out of Lightroom. Check out Nasim Mansurov's review of it on Photography Life. It analyzes each image and applies the maximum amount of compression with no visual loss of quality. You can do the same yourself by comparing multiple exports at various quality settings, but I'd rather save the time and still get maximum file savings for uploads. I also use it for my virtual tours such as KRPano and PanoTour Pro on the thousands of JPEG tiles before uploading. Sadly, JPEGmini Pro currently has a 60MP image size limitation. I hope they raise it to 512MP to match Camera RAW for pano photographers.
RAW files usually refer to native camera sensor images, such as Nikon’s NEF file format or Canon’s CR2 format, but there is also a Photoshop RAW file format that panorama applications occasionally use. It has no pixel dimension or file size limitations, supports 8-bit, 16-bit, and 32-bit color depths, but does not support layers, transparency, or metadata. It is quite efficient in file size, but does not have the advantage of file information or EXIF data that PSB has. You have to tell an application the dimensions and color depth of the image when you open it for example, and if you don’t know or didn’t document it, it can be very challenging to read the file again. I only use this format when I can’t use PSB with an application. Photoshop can read and write this file format obviously.
KRO is Kolor’s RAW format and is very similar to Photoshop RAW but has the advantage of file information as far as pixel dimensions, color depth, etc. It does not store other metadata or EXIF data however. Many panorama apps support KRO files. Photoshop can import KRO files as a Photoshop RAW file (by entering the pixel dimensions, etc. manually—it can’t read the embedded file information), but it cannot save in KRO format. This can make it difficult to edit and re-open in another app if the other program doesn’t support PSB or RAW formats. Kolor is the maker of AutoPano and PanoTour discussed below.
PTGui and AutoPano are two popular stitching programs for panoramas. Both support saving to PSB file formats for large panorama projects. I usually stay in this file format for stitched panoramas until I save my final image, and then I try to squeeze it into a 4GB single layer ZIP-compressed TIFF for archiving. My workflow with PSB files is faster without the ZIP compression of TIFFs until the final image save. If the final stitched and edited panorama won’t fit in a 4GB ZIP-compressed TIFF I leave it in PSB format, but I still save a smaller 512MP zip-compressed TIFF for keywording, cataloging, etc. in Lightroom.
PanoTour and KRPano (the engine underneath PanoTour and several panorama sharing websites) are common programs for creating virtual tours. PanoTour is a wonderful GUI for KRPano without having to learn code, but KRpano also has some droplets that you can drag photos onto for real quick virtual tours without much editing (or much customization unless you want to dive into code). Both programs support PSB file formats, another reason I use it for my large panos. KRPano makes some great tools via droplets for converting an equirectangular sphere to cube faces for touching up in Photoshop after stitching. PanoTour Pro includes a KRPano license to use these tools if you happen to own it. If you edit the convertdroplets.config file in KRPano Tools you can tell it to save in TIFF format with zip compression, or PSB format for large cube faces. I usually set everything to PSB format for converting to cube faces and back to a sphere while editing and touching up a spherical panorama after stitching. The droplets don’t preserve the embedded color space though, so if you are using ProPhoto RGB you will have to assign (not convert) that profile back to your final image in Photoshop.
When creating multi-resolution virtual tours for the web with KRPano or PanoTour I save out an 8-bit, flattened, sRGB color space PSB or TIFF file to use with them from my 16-bit, ProPhoto RGB master file. Otherwise it will not convert Adobe RGB or ProPhoto RGB color profiles to sRGB correctly for the JPEG tiles, and there is no need to import a 16-bit file when it is going to create 8-bit JPEG tiles anyway. Sometimes I can fit a very large gigapixel panorama in a 4GB TIFF file once I’ve lowered it to 8-bits per channel with a single flattened layer, but PSB files work just as well for KRPano and PanoTour Pro so it really doesn’t matter. ZIP-compressed TIFFs are smaller than PSB files though if you want to save on hard drive space for a lot of projects and they are small enough to fit under 4GB. You could import an 8-bit JPEG of course, but then you would be loss-compressing data twice, even at 100% quality, and introducing artifacts if you aren’t careful. I don’t bother uploading anything but JPEGs as a final export to online services such as 360Cities, Round.me, Google, etc. because the quality difference is unsubstantial for viewing, but the time spent uploading TIFFs on my slow internet speed is dramatic!
Round.me, 360Cities.net, and Gigapan.com are great places to display your panoramas. No need for specialized software like PanoTour unless you want to create your own customized virtual tours and host them on your own website.
Gigapan.com accepts flat panoramas only, such as large gigapixel images, and their uploader app supports PSB, TIFF, and JPEG file formats. You’ll want 8-bit, flattened, single layer files in sRGB color space for PSB and TIFF. Gigapan.com has no image size limitations.
360Cities.net supports uploading via FTP and accepts TIFF and JPEG file formats, but no partial panoramas, only cylindrical 360° panoramas and full spherical panoramas. 360Cities says they support JPEGs up to 30,000 x 15,000 and TIFFs up to 65,536 x 32,768 because that is “the maximum size allowed” by those formats, but as I’ve documented above that is not actually true.
Round.me supports full spherical panoramas in equirectangular format as either JPEG or 8-bit TIFF up to 10,000 pixels for Basic accounts and 65,000 for Pro accounts. Multiresolution display is available and automatically enabled for Pro accounts. You can also create virtual tours of multiple spherical panoramas and add audio hotspots.
Spinattic.com supports equirectangular (spherical) panoramas up to 15MB & 30,000px wide as JPEGs for free accounts, and linking them into virtual tours.
Teliportme.com is mostly a mobile platform, but has a very large audience of over 8.5 million explorers. Uploading via website is currently in testing for pro-panographers and supports up to 100MB.
Vrchive.com is designed for stereo / 3D headsets with a viewer for every major VR platform and a large VR community. They support JPEG and PNG up to 40MB and recommend 8192 x 4096px.
Photosynth.net doesn't appear to have a file size or resolution limitation--gigapans work great! Currently there is a 20GB account restriction for all your uploads. You can upload a panorama you've already stitched with PTGui Pro, AutoPano Giga, Photoshop, etc. via a Photosynth Export plugin for Photoshop (Windows only). You can get the plugin here or here. The plugin supports many forms of panoramas: rectilinear, equirectangular, cylindrical, fisheye, mercator, etc. Photosynth supports not just multi-image panoramas, but also spins, walks, and walls. Here is an example of a spin that I created.
Panoramio.com supports rectilinear and spherical panoramas up to 50MP and 25MB. Cylindrical panoramas will display as flat, rectilinear images; only full equirectangular panoramas can be displayed as spherical. To switch to spherical display, click change photo settings after uploading and change the photo type from regular to spherical.
If you are crazy enough to stitch a photo over 90 gigapixels, or you want to work on a smaller file in Photoshop for better performance, you can split a large panorama into smaller tiles with a tool like KroUtils or GigaPX and then merge the tiles back when you are done editing. Neither of those tools will read a PSB file natively unfortunately, but they will read a KRO or Photoshop RAW file format. Photoshop cannot write a KRO file though, and RAW files hold no file information as far as image size, color depth, etc. so neither are as easy to use as PSB files. If anyone knows of software that can split/merge PSB files natively I’d love to hear about it! I work in Photoshop RAW format in the mean time when I have to do this. 16-bit color depth works fine with KroUtils and GigaPX, but be sure to choose interleaved and IBM PC for the byte order, and also document the pixel dimensions of your files as you will have to enter them every time you want to read the file. If you don’t document it and forget, you will find it near impossible to open the file again later!
One last thing to remember is that your file system may also limit the size of your panoramas, regardless of file type: FAT32 for example is limited to a file size of 4GB. Windows 2000 and newer use NTFS by default which raised this limitation to 16 exabytes. Similarly old Mac HFS filesystems were limited to 2GB files and HFS+ (introduced with Mac OS 8.1) raised that to 8 exabytes. I only mention this because many USB thumbdrives are formatted as FAT32, limiting them to 4GB files regardless of file type unless you reformat them as another file system. exFAT is popular file system for large external drives, it supports up to 16 exabytes and is useful for transferring files between Windows and Mac.
HDR File Types
There are some other 32-bit HDR formats such as OpenEXR and Radiance HDR that I won’t go into details about here as they are usually used before stitching a large panorama, but you will probably run across them with HDR software such as Photomatix Pro, SNS HDR, Oloneo, etc. Photoshop easily reads these formats and can save them as 32-bit TIFFs if you want to use them in Lightroom.
Hopefully this article helps other panoramic photographers trying to figure out an efficient workflow for very large panoramas! Panoramic Photographers on Facebook is a great community and resource, if you are on Facebook. Check out our upcoming workshops if you'd like to learn more!