LibGfx: Remove maximum size limit for decoded images

It is unlikely this is needed anymore, and as pointed out things should
now safely return OOM if the bitmap is too large to allocate.

Also, no recently added decoders respected this limit anyway.

Fixes #20872
This commit is contained in:
MacDue 2023-09-01 22:58:35 +01:00 committed by Andreas Kling
commit bbf66ea055
Notes: sideshowbarker 2024-07-17 03:19:14 +09:00
6 changed files with 0 additions and 28 deletions

View file

@ -175,11 +175,6 @@ static ErrorOr<void> read_header(Context& context)
TRY(read_whitespace(context));
TRY(read_height(context));
if (context.width > maximum_width_for_decoded_images || context.height > maximum_height_for_decoded_images) {
dbgln("This portable network image is too large for comfort: {}x{}", context.width, context.height);
return Error::from_string_literal("This portable network image is too large.");
}
TRY(read_whitespace(context));
if constexpr (requires { context.format_details.max_val; }) {