| 1197 | } |
| 1198 | |
| 1199 | static void WriteAttributeToMemory(std::vector<unsigned char> *out, |
| 1200 | const char *name, const char *type, |
| 1201 | const unsigned char *data, int len) { |
| 1202 | out->insert(out->end(), name, name + strlen(name) + 1); |
| 1203 | out->insert(out->end(), type, type + strlen(type) + 1); |
| 1204 | |
| 1205 | int outLen = len; |
| 1206 | tinyexr::swap4(&outLen); |
| 1207 | out->insert(out->end(), reinterpret_cast<unsigned char *>(&outLen), |
| 1208 | reinterpret_cast<unsigned char *>(&outLen) + sizeof(int)); |
| 1209 | out->insert(out->end(), data, data + len); |
| 1210 | } |
| 1211 | |
| 1212 | typedef struct TChannelInfo { |
| 1213 | std::string name; // less than 255 bytes long |
no test coverage detected