Details
-
Bug
-
Resolution: Fixed
-
P2: Important
-
5.12
-
None
Description
There is an overflow during creation of jpeg if size exceed 32767 in one of directions.
Reproduction: create big enough jpeg.
Code example:
scene - is custom struct
auto b_r = scene.BoundingRect();
auto target_rect = QRectF(0,0,b_r.width() * 600.0 / 25.4, b_r.height() * 600.0 / 25.4);
QPixmap pm(target_rect.toRect().size());
pm.fill(Qt::white);
QPainter painter(&pm);
............
scene.sc->render(&painter, target_rect, b_r); // scene.sc is a QGraphicsScene
pm.save(fn,"JPG");