mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-31 04:45:32 +00:00
Use the PNG loader for all images, and get rid of the .rgb files.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user