mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11: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)
|
||||
{
|
||||
WebPDecoderConfig config;
|
||||
auto lump = fileSystem.OpenFileReader(SourceLump);
|
||||
auto bytes = lump.Read();
|
||||
auto bytes = fileSystem.ReadFile(SourceLump);
|
||||
|
||||
if (WebPInitDecoderConfig(&config) == false)
|
||||
return 0;
|
||||
|
@ -137,7 +136,7 @@ int FWebPTexture::CopyPixels(FBitmap *bmp, int conversion)
|
|||
config.output.u.RGBA.stride = bmp->GetPitch();
|
||||
config.output.is_external_memory = 1;
|
||||
|
||||
(void)WebPDecode(bytes.data(), bytes.size(), &config);
|
||||
(void)WebPDecode(bytes.GetBytes(), bytes.GetSize(), &config);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue