mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 07:45:33 +01:00
Merge pull request #10907 from shuffle2/pngend
SavePNG: make sure to finalize image file
This commit is contained in:
commit
000c9c7545
@ -95,8 +95,11 @@ bool SavePNG(const std::string& path, const u8* input, ImageByteFormat format, u
|
|||||||
if (spng_set_ihdr(ctx.get(), &ihdr))
|
if (spng_set_ihdr(ctx.get(), &ihdr))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (spng_encode_image(ctx.get(), nullptr, 0, SPNG_FMT_PNG, SPNG_ENCODE_PROGRESSIVE))
|
if (spng_encode_image(ctx.get(), nullptr, 0, SPNG_FMT_PNG,
|
||||||
|
SPNG_ENCODE_PROGRESSIVE | SPNG_ENCODE_FINALIZE))
|
||||||
|
{
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
for (u32 row = 0; row < height; row++)
|
for (u32 row = 0; row < height; row++)
|
||||||
{
|
{
|
||||||
const int err = spng_encode_row(ctx.get(), &input[row * stride], stride);
|
const int err = spng_encode_row(ctx.get(), &input[row * stride], stride);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user