LibGfx: Move PNG header and paeth_predictor function to a shared header

This commit is contained in:
Karol Kosek 2022-07-10 00:14:19 +02:00 committed by Andreas Kling
commit 98a90d79de
Notes: sideshowbarker 2024-07-17 16:23:06 +09:00
3 changed files with 28 additions and 27 deletions

View file

@ -112,8 +112,7 @@ void PNGWriter::add_chunk(PNGChunk& png_chunk)
void PNGWriter::add_png_header()
{
const u8 png_header[8] = { 0x89, 'P', 'N', 'G', 13, 10, 26, 10 };
m_data.append(png_header, sizeof(png_header));
m_data.append(PNG::header.data(), PNG::header.size());
}
void PNGWriter::add_IHDR_chunk(u32 width, u32 height, u8 bit_depth, PNG::ColorType color_type, u8 compression_method, u8 filter_method, u8 interlace_method)