OSDN Git Service
(root)
/
kde
/
Katie.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
16aeb35
)
correct reference to image in QPngHandler::write()
author
Ivailo Monev
<xakepa10@gmail.com>
Fri, 17 Dec 2021 03:36:19 +0000
(
05:36
+0200)
committer
Ivailo Monev
<xakepa10@gmail.com>
Fri, 17 Dec 2021 03:36:19 +0000
(
05:36
+0200)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
src/gui/image/qpnghandler.cpp
patch
|
blob
|
history
diff --git
a/src/gui/image/qpnghandler.cpp
b/src/gui/image/qpnghandler.cpp
index
9543b44
..
b807f0d
100644
(file)
--- a/
src/gui/image/qpnghandler.cpp
+++ b/
src/gui/image/qpnghandler.cpp
@@
-295,15
+295,16
@@
bool QPngHandler::write(const QImage &image)
png_bytep* row_pointers = new png_bytep[height];
for (int y=0; y<height; y++) {
- row_pointers[y] = (png_bytep)
image
.constScanLine(y);
+ row_pointers[y] = (png_bytep)
copy
.constScanLine(y);
}
png_write_image(png_ptr, row_pointers);
- delete [] row_pointers;
png_write_end(png_ptr, info_ptr);
png_destroy_write_struct(&png_ptr, &info_ptr);
+ delete [] row_pointers;
+
return true;
}