mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00:00
This reduces the number of recompiled files as follow: - Bitmap.h: 1309 -> 101 - ImmutableBitmap.h: 1218 -> 75
23 lines
523 B
C++
23 lines
523 B
C++
/*
|
|
* Copyright (c) 2025, Ladybird contributors
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/ByteBuffer.h>
|
|
#include <LibGfx/Forward.h>
|
|
#include <LibWeb/DOM/Document.h>
|
|
|
|
namespace Web::HTML {
|
|
|
|
struct SerializeBitmapResult {
|
|
ByteBuffer buffer;
|
|
StringView mime_type;
|
|
};
|
|
|
|
// https://html.spec.whatwg.org/multipage/canvas.html#a-serialisation-of-the-bitmap-as-a-file
|
|
ErrorOr<SerializeBitmapResult> serialize_bitmap(Gfx::Bitmap const& bitmap, StringView type, Optional<double> quality);
|
|
|
|
}
|