mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-02-17 01:31:25 +00:00
- use FileData for readinf WebP
This commit is contained in:
parent
c77ece4922
commit
1748477086
1 changed files with 2 additions and 3 deletions
|
@ -124,8 +124,7 @@ PalettedPixels FWebPTexture::CreatePalettedPixels(int conversion)
|
||||||
int FWebPTexture::CopyPixels(FBitmap *bmp, int conversion)
|
int FWebPTexture::CopyPixels(FBitmap *bmp, int conversion)
|
||||||
{
|
{
|
||||||
WebPDecoderConfig config;
|
WebPDecoderConfig config;
|
||||||
auto lump = fileSystem.OpenFileReader(SourceLump);
|
auto bytes = fileSystem.ReadFile(SourceLump);
|
||||||
auto bytes = lump.Read();
|
|
||||||
|
|
||||||
if (WebPInitDecoderConfig(&config) == false)
|
if (WebPInitDecoderConfig(&config) == false)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -137,7 +136,7 @@ int FWebPTexture::CopyPixels(FBitmap *bmp, int conversion)
|
||||||
config.output.u.RGBA.stride = bmp->GetPitch();
|
config.output.u.RGBA.stride = bmp->GetPitch();
|
||||||
config.output.is_external_memory = 1;
|
config.output.is_external_memory = 1;
|
||||||
|
|
||||||
(void)WebPDecode(bytes.data(), bytes.size(), &config);
|
(void)WebPDecode(bytes.GetBytes(), bytes.GetSize(), &config);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue