mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 12:57:35 +00:00
LibGfx: Improve PNG encoder API somewhat
This is still far from ideal, but let's at least make it take a Gfx::Bitmap const&.
This commit is contained in:
parent
51fe25fdbb
commit
6793574003
4 changed files with 31 additions and 30 deletions
|
@ -67,8 +67,7 @@ int main(int argc, char** argv)
|
|||
return 0;
|
||||
}
|
||||
|
||||
Gfx::PNGWriter writer;
|
||||
auto encoded_bitmap = writer.write(bitmap);
|
||||
auto encoded_bitmap = Gfx::PNGWriter::encode(*bitmap);
|
||||
if (encoded_bitmap.is_empty()) {
|
||||
warnln("Failed to encode PNG");
|
||||
return 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue