Skip to content

Commit

Permalink
adjust M to be within maximum_sizes and max_pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
rjodinchr committed Nov 10, 2023
1 parent b69493e commit 80fb87c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test_common/harness/imageHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,9 @@ void get_max_sizes(
{

size_t M = maximum_sizes[0];
size_t A = max_pixels;

M = static_cast<size_t>(fmin(A / M, M));

// Store the size
sizes[(*numberOfSizes)][0] = M;
Expand Down

0 comments on commit 80fb87c

Please sign in to comment.