This is already done at the caller decode() in PortableImageLoaderCommon.h, as pointed out by @LucasChollet at https://github.com/SerenityOS/serenity/pull/22935#discussion_r1467158789 No behavior change.
@@ -57,7 +57,6 @@ ErrorOr<void> read_image_data(PAMLoadingContext& context)
}
- context.state = PAMLoadingContext::State::BitmapDecoded;
return {};
@@ -49,7 +49,6 @@ ErrorOr<void> read_image_data(PBMLoadingContext& context)
- context.state = PBMLoadingContext::State::BitmapDecoded;
@@ -36,7 +36,6 @@ ErrorOr<void> read_image_data(PGMLoadingContext& context)
- context.state = PGMLoadingContext::State::BitmapDecoded;
@@ -45,7 +45,6 @@ ErrorOr<void> read_image_data(PPMLoadingContext& context)
- context.state = PPMLoadingContext::State::BitmapDecoded;