mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 18:55:08 +00:00
Use the PNG loader for all images, and get rid of the .rgb files.
This commit is contained in:
parent
c2a38c86cf
commit
7c0a185970
56 changed files with 90 additions and 74 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue