Skip to content

Commit

Permalink
When reading a jpeg, and the dimensions don't match, update the image…
Browse files Browse the repository at this point in the history
… dimension values so that the image at least looks right.
  • Loading branch information
Isaac Connor committed Oct 1, 2023
1 parent e535267 commit ffb8d68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/zm_image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ffb8d68

Please sign in to comment.