mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 11:07:35 +00:00
LibGfx: Move PNG header and paeth_predictor function to a shared header
This commit is contained in:
parent
ebc20f7ac3
commit
98a90d79de
3 changed files with 28 additions and 27 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue