ImageGear for C and C++ on Windows v19.1 - Updated
Large Image Formats Supported
User Guide > How to Work with... > Common Operations > Loading and Saving > Load an Image or Document > Working with Large Images > Large Image Formats Supported

The two most important factors in image file formats that affect their ability to support large images are as follows:

Although some file formats allow storing gigabyte-sized images, particular software may have difficulties with reading or writing them.

The table below lists some of the popular file formats and their capabilities for storing gigabyte-sized images.

Image Format

Max Available Image Dimensions (width x height, in pixels)

Approximate Max Image Size, When Uncompressed (for a 24-bit RGB image)

Approximate File Size Limit

JPEG, EXIF-JPEG

65535 x 65535

 

12 Gb

None

TIFF, EXIF-TIFF

2^32-1 x 2^32-1

3 * 2^24 Tb

4 Gb 1

JP2, JPX

2^32-1 x 2^32-1

3 * 2^24 Tb

None 

PSB

300 000 x 300 000

250Gb

None

PSD

30 000 x 30 000

25Gb

4 Gb

BMP

2^31-1x 2^31-1

3 * 2^20Tb

4 Gb

PNG

2^32-1 x 2^32 - 1

3* 2^24Tb

None

DICOM

65535 x 65535

 

12 Gb

2 Gb

PBM / PGM / PPM / PNM

None

None

None

TGA

65535 x 65535

12 Gb

4 Gb

1 TIFF format uses 32-bit unsigned integers to store data offsets and sizes. As a result, a strip of pixel data in a TIFF image cannot be stored at an offset greater than 4 Gb, and its size formally cannot be greater than 4 Gb. Thus, the size of the largest compliant TIFF image can be a bit less than 8 Gb. This assumes that two strips of nearly 4 Gb size are used.

ImageGear supports the reading and writing of single-page, single-strip, single-tiled uncompressed TIFF images where strip byte counts are greater than 4 Gb. If the size of a strip exceeds 4 Gb, ImageGear writes 0 to the StripBytes tag. The reader can calculate strip size from image dimensions in such a case.
Note, though, that such files are formally incompliant and may not be supported by other readers.

When writing a gigabyte-sized TIFF image, make sure to keep the IMAGE_BEFORE_IFD TIFF control parameter set to its default value of FALSE.