1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 09:47:34 +00:00

LibGfx: Rename JPGLoader to JPEGLoader

The patch also contains modifications on several classes, functions or
files that are related to the `JPGLoader`.

Renaming include:
 - JPGLoader{.h, .cpp}
 - JPGImageDecoderPlugin
 - JPGLoadingContext
 - JPG_DEBUG
 - decode_jpg
 - FuzzJPGLoader.cpp
 - Few string literals or texts
This commit is contained in:
Lucas CHOLLET 2023-02-18 16:09:16 -05:00 committed by Andreas Kling
parent ab298ca106
commit 856d0202f2
14 changed files with 118 additions and 118 deletions

View file

@ -6,7 +6,7 @@
#include <AK/Hex.h>
#include <LibCompress/Deflate.h>
#include <LibGfx/JPGLoader.h>
#include <LibGfx/JPEGLoader.h>
#include <LibPDF/CommonNames.h>
#include <LibPDF/Filter.h>
@ -269,14 +269,14 @@ ErrorOr<ByteBuffer> Filter::decode_jbig2(ReadonlyBytes)
ErrorOr<ByteBuffer> Filter::decode_dct(ReadonlyBytes bytes)
{
if (Gfx::JPGImageDecoderPlugin::sniff({ bytes.data(), bytes.size() }).release_value_but_fixme_should_propagate_errors()) {
auto decoder = Gfx::JPGImageDecoderPlugin::create({ bytes.data(), bytes.size() }).release_value_but_fixme_should_propagate_errors();
if (Gfx::JPEGImageDecoderPlugin::sniff({ bytes.data(), bytes.size() }).release_value_but_fixme_should_propagate_errors()) {
auto decoder = Gfx::JPEGImageDecoderPlugin::create({ bytes.data(), bytes.size() }).release_value_but_fixme_should_propagate_errors();
if (decoder->initialize()) {
auto frame = TRY(decoder->frame(0));
return frame.image->serialize_to_byte_buffer();
}
}
return AK::Error::from_string_literal("Not a JPG image!");
return AK::Error::from_string_literal("Not a JPEG image!");
};
ErrorOr<ByteBuffer> Filter::decode_jpx(ReadonlyBytes)