mirror of
https://github.com/Relintai/pandemonium_engine_minimal.git
synced 2025-01-04 20:59:36 +01:00
22 lines
620 B
C++
22 lines
620 B
C++
#ifndef PNG_DRIVER_COMMON_H
|
|
#define PNG_DRIVER_COMMON_H
|
|
|
|
/* png_driver_common.h */
|
|
|
|
|
|
#include "core/io/image.h"
|
|
#include "core/containers/pool_vector.h"
|
|
|
|
namespace PNGDriverCommon {
|
|
|
|
// Attempt to load png from buffer (p_source, p_size) into p_image
|
|
Error png_to_image(const uint8_t *p_source, size_t p_size, bool p_force_linear, Ref<Image> p_image);
|
|
|
|
// Append p_image, as a png, to p_buffer.
|
|
// Contents of p_buffer is unspecified if error returned.
|
|
Error image_to_png(const Ref<Image> &p_image, PoolVector<uint8_t> &p_buffer);
|
|
|
|
} // namespace PNGDriverCommon
|
|
|
|
#endif
|