2023-12-14 21:54:22 +01:00
|
|
|
#ifndef RESOURCE_SAVER_PNG_H
|
|
|
|
#define RESOURCE_SAVER_PNG_H
|
2023-12-17 15:39:29 +01:00
|
|
|
|
2023-12-14 21:54:22 +01:00
|
|
|
/* resource_saver_png.h */
|
2023-12-17 15:39:29 +01:00
|
|
|
|
2023-12-14 21:54:22 +01:00
|
|
|
|
|
|
|
#include "core/io/image.h"
|
|
|
|
#include "core/io/resource_saver.h"
|
|
|
|
|
|
|
|
class ResourceSaverPNG : public ResourceFormatSaver {
|
|
|
|
public:
|
|
|
|
static Error save_image(const String &p_path, const Ref<Image> &p_img);
|
|
|
|
static PoolVector<uint8_t> save_image_to_buffer(const Ref<Image> &p_img);
|
|
|
|
|
|
|
|
virtual Error save(const String &p_path, const RES &p_resource, uint32_t p_flags = 0);
|
|
|
|
virtual bool recognize(const RES &p_resource) const;
|
|
|
|
virtual void get_recognized_extensions(const RES &p_resource, List<String> *p_extensions) const;
|
|
|
|
|
|
|
|
ResourceSaverPNG();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // RESOURCE_SAVER_PNG_H
|