From ffb8d68c74bd6fd6e7ed71b954bd741208fd87f1 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Sun, 1 Oct 2023 09:58:59 -0400 Subject: [PATCH] When reading a jpeg, and the dimensions don't match, update the image dimension values so that the image at least looks right. --- src/zm_image.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/zm_image.cpp b/src/zm_image.cpp index 87e34cc65c..94b38fe2bf 100644 --- a/src/zm_image.cpp +++ b/src/zm_image.cpp @@ -1021,6 +1021,8 @@ bool Image::ReadJpeg(const std::string &filename, unsigned int p_colours, unsign if ((width != new_width) || (height != new_height)) { Debug(9, "Image dimensions differ. Old: %ux%u New: %ux%u", width, height, new_width, new_height); + width = new_width; + height = new_height; } switch (p_colours) {