MCPcopy Create free account
hub / github.com/DiscordMessenger/dm / DecodeWebp

Function DecodeWebp

src/windows/ImageLoader.cpp:64–72  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62#include <webp/decode.h>
63
64static Image DecodeWebp(const uint8_t* pData, size_t size)
65{
66 int width = 0, height = 0;
67 uint8_t* Data = WebPDecodeBGRA(pData, size, &width, &height);
68 if (!Data)
69 return Image();
70
71 return Image(ImageFrame(Data, WebPFree), width, height);
72}
73
74#else
75

Callers 1

ConvertToBitmapMethod · 0.85

Calls 2

ImageClass · 0.85
ImageFrameClass · 0.85

Tested by

no test coverage detected