Add load and save image overload.

This commit is contained in:
Relintai 2022-02-15 18:55:08 +01:00
parent d3856fdfe5
commit bedbae833a
2 changed files with 10 additions and 0 deletions

View File

@ -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).

View File

@ -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).