Skip to content

Commit be98f7e

Browse files
committed
Add callback to send back the image size
1 parent 03463fd commit be98f7e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

engine/core/core_image.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,8 @@ bool webp_c::Load(std::filesystem::path const& fileName, std::optional<size_call
511511
if (!valid)
512512
return true;
513513

514+
if (sizeCallback)
515+
(*sizeCallback)(width, height);
514516
auto data = WebPDecodeRGBA(fileData.data(), fileData.size(), &width, &height);
515517
bool success = CopyRaw(IMGTYPE_RGBA, width, height, data);
516518
WebPFree(data);

0 commit comments

Comments
 (0)