1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 05:58:13 +00:00

LibGfx: Change return type of Adler32 checksums in PNGWriter

The two Adler32 checksums are u16 and these two getters were mistakenly
left as u32 when PNGChunk::add_as_big_endian() was templated leading
to corrupted IDAT fields in our PNGs.
This commit is contained in:
Marcus Nilsson 2022-01-13 16:27:29 +01:00 committed by Andreas Kling
parent 8ad46fd8f5
commit 6523f03d47

View file

@ -51,8 +51,8 @@ public:
void finalize(PNGChunk&);
void add_byte_to_block(u8 data, PNGChunk&);
u32 adler_s1() const { return m_adler_s1; }
u32 adler_s2() const { return m_adler_s2; }
u16 adler_s1() const { return m_adler_s1; }
u16 adler_s2() const { return m_adler_s2; }
private:
void add_block_to_chunk(PNGChunk&, bool);