MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / save_dds

Function save_dds

modules/dds/image_saver_dds.cpp:46–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44#include "core/io/stream_peer.h"
45
46Error save_dds(const String &p_path, const Ref<Image> &p_img) {
47 Vector<uint8_t> buffer = save_dds_buffer(p_img);
48
49 Ref<FileAccess> file = FileAccess::open(p_path, FileAccess::WRITE);
50 if (file.is_null()) {
51 return ERR_CANT_CREATE;
52 }
53
54 file->store_buffer(buffer.ptr(), buffer.size());
55
56 return OK;
57}
58
59enum DDSFormatType {
60 DDFT_BITMASK,

Callers 1

test_dds.hFile · 0.85

Calls 5

save_dds_bufferFunction · 0.85
sizeMethod · 0.65
is_nullMethod · 0.45
store_bufferMethod · 0.45
ptrMethod · 0.45

Tested by

no test coverage detected