We are outputting a map file with composer : size 45,312 pixels width and 4,352 pixels height in TIFF and PNG format.

The map is calculated but in the file we have only 32,768 pixels width show, the rest of the image is blank (actually transparent due to the alpha chanel). The output file size is 45,312x4,352 as demanded.

There's a limitation for QGIS on image calculation width (and/or height) ?

We are running on QGIS 2.8.2 / Ubuntu 14.04 LTS 64bit / 32GB RAM

Another limitation : look like the file size cannot exeed 1.5 GB...

Does those limitations still exist in QGIS 2.10 ?


I've come across this limit too.

PNGs are limited to 32768 (the fact that it's a nice round number in binary hints at the reason) - see this discussion. JPEG also has a similar limit I think.

I think TIFFs have a similar issue, with using 32-bit offsets in the file structures. While you might be able to push the width past that, the total file size can't get above 4Gb. (There's BigTiff support if you have a reasonably up-to-date libtiff and GDAL setup, but I don't see BigTiff as one of the export options)

You could try JPEG2000 (shown as JP2 in the 'save as image' dialog), I believe that has more relaxed limits (see this forum thread)

  • Ok I will have try with JPEG2000 - How can I set some parameters in order to have no compression at all ?
    – Mathieu
    Aug 19 '15 at 9:16
  • you can't, as far as I can tell.. :/ same goes for all file formats, would be useful if we could access those settings, especially for the lossy ones
    – Steven Kay
    Aug 19 '15 at 9:36
  • The PNG format itself does not have a limitation to 32768 pixels. It stores the width and height using 4 bytes each, hence their maximum is 4294967295 pixles (see this answer on SO. Jan 16 '21 at 13:47

I just ran into a similar issue on QGIS 3.10.4, where the image output was truncated after 32768 pixels. This is not an issue with the PNG file format, which allows image dimensions up to 4294967295 pixels.

I suspect that this is a bug in QGIS and I've filed a bug report.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.