mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 01:17:35 +00:00
LibGfx: Remove load_FORMAT() image codec wrappers
We had a bunch of old unused wrapper functions for each image codec that would load a supported image with a given path. Nobody actually used them, so let's just get rid of load_png(), load_gif(), etc.
This commit is contained in:
parent
09780ba7a9
commit
10add3f4c2
20 changed files with 2 additions and 105 deletions
|
@ -8,7 +8,6 @@
|
|||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/Debug.h>
|
||||
#include <AK/HashMap.h>
|
||||
#include <AK/LexicalPath.h>
|
||||
#include <AK/Math.h>
|
||||
#include <AK/MemoryStream.h>
|
||||
#include <AK/String.h>
|
||||
|
@ -1235,14 +1234,6 @@ static RefPtr<Gfx::Bitmap> load_jpg_impl(const u8* data, size_t data_size)
|
|||
return context.bitmap;
|
||||
}
|
||||
|
||||
RefPtr<Gfx::Bitmap> load_jpg(String const& path)
|
||||
{
|
||||
auto file_or_error = MappedFile::map(path);
|
||||
if (file_or_error.is_error())
|
||||
return nullptr;
|
||||
return load_jpg_from_memory((u8 const*)file_or_error.value()->data(), file_or_error.value()->size(), path);
|
||||
}
|
||||
|
||||
RefPtr<Gfx::Bitmap> load_jpg_from_memory(u8 const* data, size_t length, String const& mmap_name)
|
||||
{
|
||||
auto bitmap = load_jpg_impl(data, length);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue