mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:37:45 +00:00
LibGfx: Propagate errors that occur internally in PNGWriter
This patch basically uses the TRY() macro throughout PNGWriter instead of relying on the MUST()'ing wrappers in Vector and ByteBuffer. One FIXME was killed in the making of this patch. :^)
This commit is contained in:
parent
d88c7fee32
commit
e19c8897ee
2 changed files with 85 additions and 72 deletions
|
@ -23,11 +23,11 @@ private:
|
|||
PNGWriter() = default;
|
||||
|
||||
Vector<u8> m_data;
|
||||
void add_chunk(PNGChunk&);
|
||||
void add_png_header();
|
||||
void add_IHDR_chunk(u32 width, u32 height, u8 bit_depth, PNG::ColorType color_type, u8 compression_method, u8 filter_method, u8 interlace_method);
|
||||
void add_IDAT_chunk(Gfx::Bitmap const&);
|
||||
void add_IEND_chunk();
|
||||
ErrorOr<void> add_chunk(PNGChunk&);
|
||||
ErrorOr<void> add_png_header();
|
||||
ErrorOr<void> add_IHDR_chunk(u32 width, u32 height, u8 bit_depth, PNG::ColorType color_type, u8 compression_method, u8 filter_method, u8 interlace_method);
|
||||
ErrorOr<void> add_IDAT_chunk(Gfx::Bitmap const&);
|
||||
ErrorOr<void> add_IEND_chunk();
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue