| 1267 | } |
| 1268 | |
| 1269 | static void WriteAttributeToMemory(std::vector<unsigned char> *out, |
| 1270 | const char *name, const char *type, |
| 1271 | const unsigned char *data, int len) { |
| 1272 | out->insert(out->end(), name, name + strlen(name) + 1); |
| 1273 | out->insert(out->end(), type, type + strlen(type) + 1); |
| 1274 | |
| 1275 | int outLen = len; |
| 1276 | tinyexr::swap4(&outLen); |
| 1277 | out->insert(out->end(), reinterpret_cast<unsigned char *>(&outLen), |
| 1278 | reinterpret_cast<unsigned char *>(&outLen) + sizeof(int)); |
| 1279 | out->insert(out->end(), data, data + len); |
| 1280 | } |
| 1281 | |
| 1282 | typedef struct TChannelInfo { |
| 1283 | std::string name; // less than 255 bytes long |
no test coverage detected