Skip to content

Commit

Permalink
don't show image size on std::cout unless SHOW_WEBP_SIZE is defined
Browse files Browse the repository at this point in the history
This output was initially added for development purposes, so it
should not end up in the final build.
  • Loading branch information
striezel committed Feb 27, 2024
1 parent 6e3c94d commit 767c1d4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions webp-viewer/viewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ nonstd::expected<window_data, int> create_window_for_image(const std::filesystem
std::cerr << "Error: " << file << " is not a WebP file!\n";
return nonstd::make_unexpected(rcInputOutputError);
}
#ifdef SHOW_WEBP_SIZE
std::cout << "Image size: " << dims.value() << std::endl;
#endif // SHOW_WEBP_SIZE

const auto anims = has_animations(buffer.value());
const bool animated = anims.has_value() && anims.value();
Expand Down
1 change: 1 addition & 0 deletions webp-viewer/webp-viewer.cbp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<Option compiler="gcc" />
<Compiler>
<Add option="-g" />
<Add option="-DSHOW_WEBP_SIZE" />
</Compiler>
</Target>
<Target title="Release">
Expand Down

0 comments on commit 767c1d4

Please sign in to comment.