mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-12 19:19:30 +00:00
LibPDF: Send jpeg data down the same path as all other data
JPEG images now honor decode arrays and color spaces.
This commit is contained in:
parent
d8ada20bae
commit
e770cf06b0
Notes:
sideshowbarker
2024-07-17 04:09:56 +09:00
Author: https://github.com/nico
Commit: e770cf06b0
Pull-request: https://github.com/SerenityOS/serenity/pull/22650
Reviewed-by: https://github.com/LucasChollet ✅
2 changed files with 31 additions and 10 deletions
|
@ -1124,11 +1124,6 @@ PDFErrorOr<Renderer::LoadedImage> Renderer::load_image(NonnullRefPtr<StreamObjec
|
|||
component_value_decoders.empend(0.0f, 255.0f, dmin, dmax);
|
||||
}
|
||||
|
||||
if (TRY(is_filter(CommonNames::DCTDecode))) {
|
||||
// TODO: stream objects could store Variant<bytes/Bitmap> to avoid serialisation/deserialisation here
|
||||
return LoadedImage { TRY(Gfx::Bitmap::create_from_serialized_bytes(image->bytes())), is_image_mask };
|
||||
}
|
||||
|
||||
auto bitmap = MUST(Gfx::Bitmap::create(Gfx::BitmapFormat::BGRA8888, { width, height }));
|
||||
int x = 0;
|
||||
int y = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue