mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:17:35 +00:00
PixelPaint: Use move semantics around Layer construction and accessors
This commit is contained in:
parent
a612c22278
commit
c7f7c1f7f0
3 changed files with 19 additions and 17 deletions
|
@ -98,7 +98,9 @@ RefPtr<Image> Image::try_create_from_pixel_paint_file(String const& file_path)
|
|||
auto bitmap_base64_encoded = json_layer_object.get("bitmap").as_string();
|
||||
auto bitmap_data = decode_base64(bitmap_base64_encoded);
|
||||
auto image_decoder = Gfx::ImageDecoder::create(bitmap_data);
|
||||
layer->set_bitmap(*image_decoder->bitmap());
|
||||
auto bitmap = image_decoder->bitmap();
|
||||
VERIFY(bitmap);
|
||||
layer->set_bitmap(bitmap.release_nonnull());
|
||||
image->add_layer(*layer);
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue