diff options
author | Timothy <timmot@users.noreply.github.com> | 2021-09-07 21:13:29 +1000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-09 02:34:29 +0200 |
commit | c966c325719673a411b793250b6247862e3b89de (patch) | |
tree | 5a10b136a4252c8414db78f5481436870fa4225c /Userland/Libraries/LibGfx/JPGLoader.h | |
parent | eb5320023ad6d4746dd6abfa191ea2e016719077 (diff) | |
download | serenity-c966c325719673a411b793250b6247862e3b89de.zip |
LibGfx: Move common loader functionality to load from memory functions
This will share functionality between the load from path and load from
memory functions.
Diffstat (limited to 'Userland/Libraries/LibGfx/JPGLoader.h')
-rw-r--r-- | Userland/Libraries/LibGfx/JPGLoader.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Libraries/LibGfx/JPGLoader.h b/Userland/Libraries/LibGfx/JPGLoader.h index 549eeee019..04741fa978 100644 --- a/Userland/Libraries/LibGfx/JPGLoader.h +++ b/Userland/Libraries/LibGfx/JPGLoader.h @@ -6,6 +6,8 @@ #pragma once +#include <AK/MappedFile.h> +#include <AK/String.h> #include <AK/Vector.h> #include <LibGfx/Bitmap.h> #include <LibGfx/ImageDecoder.h> @@ -14,7 +16,7 @@ namespace Gfx { RefPtr<Gfx::Bitmap> load_jpg(String const& path); -RefPtr<Gfx::Bitmap> load_jpg_from_memory(const u8* data, size_t length); +RefPtr<Gfx::Bitmap> load_jpg_from_memory(u8 const* data, size_t length, String const& mmap_name = "<memory>"); struct JPGLoadingContext; |