I can’t get the arrayBytes in this code
auto callback = [&](RenderTexture* rt, const std::string& path)
{
///From Cpp-Test FileUtils
Data readData = FileUtils::getInstance()->getDataFromFile(path);
buffer = (unsigned char*)malloc(sizeof(unsigned char) * (readData.getSize() + 1));
memcpy(buffer, readData.getBytes(), readData.getSize());
buffer[readData.getSize()] = '\0';
std::string readDataStr((const char*)buffer);
free(buffer);
};
_target-> saveToFileAsNonPMA(png, Image::Format::PNG, true, callback);
only get this "\x89PNG\r\n\x1a\n\0\0\0\rIHDR\0\0\x04\0\0\0\x02@\b\x06\0\0\0\x13\x95\x14�
but if I used the android java open file I get the whole File