mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 22:17:44 +00:00
PixelPaint: Support opening more image file formats
Previously we could only open .pp files, now we can open all formats supported by Gfx::Bitmap::load_from_file
This commit is contained in:
parent
566d3cb393
commit
76adac103e
3 changed files with 34 additions and 3 deletions
|
@ -37,7 +37,8 @@ protected:
|
|||
class Image : public RefCounted<Image> {
|
||||
public:
|
||||
static RefPtr<Image> create_with_size(const Gfx::IntSize&);
|
||||
static RefPtr<Image> create_from_file(const String& file_path);
|
||||
static RefPtr<Image> create_from_file(String const& file_path);
|
||||
static RefPtr<Image> create_from_bitmap(RefPtr<Gfx::Bitmap> bitmap);
|
||||
|
||||
size_t layer_count() const { return m_layers.size(); }
|
||||
const Layer& layer(size_t index) const { return m_layers.at(index); }
|
||||
|
@ -74,6 +75,8 @@ public:
|
|||
private:
|
||||
explicit Image(const Gfx::IntSize&);
|
||||
|
||||
static RefPtr<Image> create_from_pixel_paint_file(String const& file_path);
|
||||
|
||||
void did_change();
|
||||
void did_modify_layer_stack();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue