FS#1551File > Bitmap Export: exception when image size too large
- Type
- Bug
- Status
- Closed
- Resolution
- Fixed
- Category
- QCAD (main)
- Severity
- Low
- Priority
- Low
- Reported version
- 3.16.5
- Operating system
- All
- Reported
- 2017-02-28 by Spirou4D
- Closed
- 2017-02-28 by andrew
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 :
3.16.4.4 (3.16.4.4)
Internet :
QCAD.org
Date de fabrication :
Jan 26 2017
Révision :
Qt Version :
4.8.7
Architecture :
x86_64
Compiler :
gcc 5.4.0
Comments (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).