summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-06 01:00:07 +0200
committerQt Forward Merge Bot <qt_forward_merge_bot@qt-project.org>2019-04-06 01:00:08 +0200
commitce7f14d2e0791acc92622fdc23886a06d6712e90 (patch)
tree5f2b0f0a6c4a37dfaa1f31abf7e58d8a3cec1e3c /src/gui/image
parent0998a9d1d53361e572d7377af8cb41a49bbfad72 (diff)
parentf4c41b9797f08f173049502fa7bd465cf5bde938 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpnghandler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index 140196004b..1c269213e2 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -231,8 +231,8 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, QSize scal
if (screen_gamma != 0.0 && file_gamma != 0.0)
png_set_gamma(png_ptr, 1.0f / screen_gamma, file_gamma);
- png_uint_32 width;
- png_uint_32 height;
+ png_uint_32 width = 0;
+ png_uint_32 height = 0;
int bit_depth = 0;
int color_type = 0;
png_bytep trans_alpha = 0;
@@ -240,7 +240,7 @@ void setup_qt(QImage& image, png_structp png_ptr, png_infop info_ptr, QSize scal
int num_trans;
png_colorp palette = 0;
int num_palette;
- int interlace_method;
+ int interlace_method = PNG_INTERLACE_LAST;
png_get_IHDR(png_ptr, info_ptr, &width, &height, &bit_depth, &color_type, &interlace_method, 0, 0);
png_set_interlace_handling(png_ptr);
@@ -689,7 +689,7 @@ bool QPngHandlerPrivate::readPngImage(QImage *outImage)
QImage::Format QPngHandlerPrivate::readImageFormat()
{
QImage::Format format = QImage::Format_Invalid;
- png_uint_32 width, height;
+ png_uint_32 width = 0, height = 0;
int bit_depth = 0, color_type = 0;
png_colorp palette;
int num_palette;