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

Method create_from_data

core/io/image.cpp:2171–2176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2169}
2170
2171Ref<Image> Image::create_from_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) {
2172 Ref<Image> image;
2173 image.instantiate();
2174 image->initialize_data(p_width, p_height, p_use_mipmaps, p_format, p_data);
2175 return image;
2176}
2177
2178void Image::set_data(int p_width, int p_height, bool p_use_mipmaps, Format p_format, const Vector<uint8_t> &p_data) {
2179 initialize_data(p_width, p_height, p_use_mipmaps, p_format, p_data);

Callers

nothing calls this directly

Calls 2

initialize_dataMethod · 0.80
instantiateMethod · 0.45

Tested by

no test coverage detected