summaryrefslogtreecommitdiff
path: root/SharedGraphics/GraphicsBitmap.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-03-22 00:19:53 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-03-22 00:21:03 +0100
commit7c0a185970b7d1053eeef464ec81f8490717587d (patch)
tree7fd8b88cae98087d9cad43e667267a3f4b0c52a3 /SharedGraphics/GraphicsBitmap.cpp
parentc2a38c86cfb2f7c35b8f0a860ca43c717dda0153 (diff)
downloadserenity-7c0a185970b7d1053eeef464ec81f8490717587d.zip
Use the PNG loader for all images, and get rid of the .rgb files.
Diffstat (limited to 'SharedGraphics/GraphicsBitmap.cpp')
-rw-r--r--SharedGraphics/GraphicsBitmap.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/SharedGraphics/GraphicsBitmap.cpp b/SharedGraphics/GraphicsBitmap.cpp
index eb41c041c5..b48cdf853a 100644
--- a/SharedGraphics/GraphicsBitmap.cpp
+++ b/SharedGraphics/GraphicsBitmap.cpp
@@ -1,4 +1,5 @@
-#include "GraphicsBitmap.h"
+#include <SharedGraphics/GraphicsBitmap.h>
+#include <SharedGraphics/PNGLoader.h>
#include <sys/mman.h>
#include <unistd.h>
#include <fcntl.h>
@@ -27,6 +28,11 @@ Retained<GraphicsBitmap> GraphicsBitmap::create_wrapper(Format format, const Siz
return adopt(*new GraphicsBitmap(format, size, data));
}
+RetainPtr<GraphicsBitmap> GraphicsBitmap::load_from_file(const String& path)
+{
+ return load_png(path);
+}
+
RetainPtr<GraphicsBitmap> GraphicsBitmap::load_from_file(Format format, const String& path, const Size& size)
{
int fd = open(path.characters(), O_RDONLY, 0644);