mirror of
https://github.com/Relintai/rcpp_framework.git
synced 2024-11-10 00:52:11 +01:00
Add load and save image overload.
This commit is contained in:
parent
d3856fdfe5
commit
bedbae833a
@ -5,6 +5,13 @@
|
||||
|
||||
#include "core/os/directory.h"
|
||||
|
||||
Error PNGLoader::load_image(Ref<Image> p_image, const char *f, bool p_force_linear) {
|
||||
return load_image(p_image, String(f), p_force_linear);
|
||||
}
|
||||
Error PNGLoader::save_image(const char *f, const Ref<Image> &p_img) {
|
||||
return save_image(String(f), p_img);
|
||||
}
|
||||
|
||||
// Taken from the Godot Engine (MIT License)
|
||||
// Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
|
||||
// Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
|
||||
|
@ -7,6 +7,9 @@
|
||||
|
||||
class PNGLoader {
|
||||
public:
|
||||
static Error load_image(Ref<Image> p_image, const char* f, bool p_force_linear);
|
||||
static Error save_image(const char* f, const Ref<Image> &p_img);
|
||||
|
||||
// Taken from the Godot Engine (MIT License)
|
||||
// Copyright (c) 2007-2021 Juan Linietsky, Ariel Manzur.
|
||||
// Copyright (c) 2014-2021 Godot Engine contributors (cf. AUTHORS.md).
|
||||
|
Loading…
Reference in New Issue
Block a user