QCAD - 2D CAD System.

Click here for a documentation of the DokuWiki formatting syntax that can be used in reports

Please search for existing tasks (also closed ones) before opening a new task.

Please make sure that you are using the latest Version of QCAD before posting a bug (menu Help > Check for Updates)


FS#1551 - File > Bitmap Export: exception when image size too large

Attached to Project: QCAD
Opened by Jean Spiren (Spirou4D) - Tuesday, 28 February 2017, 13:02 GMT+1
Last edited by Andrew (andrew) - Tuesday, 28 February 2017, 13:49 GMT+1
Task Type Bug Report
Category QCAD (main)
Status Closed
Assigned To Andrew (andrew)
Operating System All
Severity Low
Priority Normal
Reported Version 3.16.5
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No


Hi friends,

I have this traceback with my Qcad from ppa for linux, to export in png image:
Warning: libpng warning: Image width is zero in IHDR
Warning: libpng warning: Image height is zero in IHDR
libpng error: Invalid IHDR data
Error: cannot save file: /home/patrinux/Bureau/IMAGE.png
Error: Unknown error
Debug: got transaction
Warning: RScriptHandlerEcma::eval: script engine exception: “Error: :-1:-1: Wrong number/types of arguments for RMainWindowQt.handleUserWarning().
<native>() at -1
<anonymous>() at scripts/File/BitmapExport/BitmapExport.js:56
<native>(RActionAdapter(0x26d1ea0)) at -1
<global>() at 1” Warning: “<anonymous>()@scripts/File/BitmapExport/BitmapExport.js:56” Debug: got transaction

Impossible to obtain an png image, and others too. I am on Linux Mint Serena 64B alias Ubuntu Xenial 16.04. Qcad last release:

Version : (
Internet :
Date de fabrication :
Jan 26 2017
Révision :

Qt Version :
Architecture :
Compiler :
gcc 5.4.0

This task depends upon

Closed by  Andrew (andrew)
Tuesday, 28 February 2017, 13:49 GMT+1
Reason for closing:  Fixed
Additional comments about closing:  https://github.com/qcad/qcad/commit/7f84 e697f2d0ebf98bcf1fa5b14bf365701b4397
Comment by Andrew (andrew) - Tuesday, 28 February 2017, 13:49 GMT+1

Thanks for your report.

This would indicate that the size of your bitmap exceeds the maximum possible size of w x h x 4 ≤ 2147483647.
I've implemented a fix that outputs an error if that size limit is exceeded. Unfortunately, that means that exporting to the desired size is not possible (due to limitations of Qt image export).