1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 08:27:46 +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

@ -10,7 +10,7 @@
#include <LibGfx/BMPLoader.h>
#include <LibGfx/BMPWriter.h>
#include <LibGfx/Bitmap.h>
#include <LibGfx/JPGLoader.h>
#include <LibGfx/JPEGLoader.h>
#include <LibGfx/PNGLoader.h>
#include <LibGfx/PNGWriter.h>
#include <memory.h>
@ -154,10 +154,10 @@ void SpiceAgent::on_message_received()
frame_or_error = bmp_decoder->frame(0);
}
} else if (type == ClipboardType::JPG) {
if (Gfx::JPGImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors()) {
auto jpg_decoder = Gfx::JPGImageDecoderPlugin::create({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors();
if (jpg_decoder->initialize())
frame_or_error = jpg_decoder->frame(0);
if (Gfx::JPEGImageDecoderPlugin::sniff({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors()) {
auto jpeg_decoder = Gfx::JPEGImageDecoderPlugin::create({ data_buffer.data(), data_buffer.size() }).release_value_but_fixme_should_propagate_errors();
if (jpeg_decoder->initialize())
frame_or_error = jpeg_decoder->frame(0);
}
} else {
dbgln("Unknown clipboard type: {}", (u32)type);