The maximum size limit for a QImage is imposed as follows:

QImageData *d = 0; if (format == QImage::Format_Invalid) return d; const int depth = qt_depthForFormat(format); const int calc_bytes_per_line = ((width * depth + 31)/32) * 4; const int min_bytes_per_line = (width * depth + 7)/8; if (bpl <= 0) bpl = calc_bytes_per_line; if (width <= 0 || height <= 0 || !data || INT_MAX/sizeof(uchar *) < uint(height) || INT_MAX/uint(depth) < uint(width) || bpl <= 0 || height <= 0 || bpl < min_bytes_per_line || INT_MAX/uint(bpl) < uint(height)) return d; 

However, when creating an empty image of the Format_Mono format (1 bit per pixel) measuring more than 32767x32767 , and then trying to apply anything to it, for example, drawText, all part of the text applied beyond 32767x32767 is clipped. That is, just a white background with a size of 40000x40000 was created for me, and when I try to apply it, everything is clipped. Why?

After all, as I understood from here https://stackoverflow.com/questions/7080052/qimage-qpixmap-size-limitations , only 32767x32767 has a limitation in the physical size QPixmap , and in QImage it is only in memory.

    1 answer 1

    The size 32767x32767 is limited to both QPixmap and QImage. This is confirmed by the answer to the question on your link:

    Both are limited to 32767x32767 pixels. It is a 16-bit value for both the X and Y resolution.

    • No, read below, it says “This may be correct for QPixmap,” And in the answer, povman gives an exhaustive answer about QImage's limitations - bronstein87