Max paper sheet length?

Issue #694 resolved
legija created an issue

I've encountered a maximum, and I'm not sure this is intentional.

When I try to make my paper size longer, I can go to a maximum of 866.99 centimeters. Is this by design?

Comments (9)

  1. legija reporter

    I guess a bug report, in my mind, we should be able to select a paper size bigger than 866.99. Either this is a bug, or it's by design. If it's by design, it's solved, if not, then we have a bug :)

  2. Roman Telezhynskyi repo owner

    This is by design:

    QImage supports a maximum of 32768x32768 px images (signed short).
    This follows from the condition: width * height * colordepth < INT_MAX (4 billion) -> 32768 * 32768 * 4 = 4 billion.
    The second condition is of course that malloc is able to allocate the requested memory.

    If you really need bigger images you will have to use another wrapper or split into multiple QImage's.

    If convert pixels to cm you will get:

    32768 / 96 * 25.4 / 10 =  866.986666667 cm
    
  3. Roman Telezhynskyi repo owner

    We need QImage to be able to export to png. Probably all other formats don't need this restriction.

  4. Log in to comment