Skip to content

Commit

Permalink
thumbnailer: make sure output size in not zero
Browse files Browse the repository at this point in the history
  • Loading branch information
farindk committed Oct 20, 2024
1 parent b56f7c1 commit 9674b65
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/heif_thumbnailer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,11 @@ int main(int argc, char** argv)
thumbnail_width = thumbnail_height = 0;
}

if (thumbnail_width == 0 || thumbnail_height == 0) {
std::cerr << "Zero thumbnail output size\n";
return 1;
}


// --- output thumbnail smaller than HEIF thumbnail -> scale down

Expand Down

0 comments on commit 9674b65

Please sign in to comment.