| 1123 | } |
| 1124 | |
| 1125 | static void WriteAttributeToMemory(std::vector<unsigned char> *out, |
| 1126 | const char *name, const char *type, |
| 1127 | const unsigned char *data, int len) { |
| 1128 | out->insert(out->end(), name, name + strlen(name) + 1); |
| 1129 | out->insert(out->end(), type, type + strlen(type) + 1); |
| 1130 | |
| 1131 | int outLen = len; |
| 1132 | tinyexr::swap4(&outLen); |
| 1133 | out->insert(out->end(), reinterpret_cast<unsigned char *>(&outLen), |
| 1134 | reinterpret_cast<unsigned char *>(&outLen) + sizeof(int)); |
| 1135 | out->insert(out->end(), data, data + len); |
| 1136 | } |
| 1137 | |
| 1138 | typedef struct TChannelInfo { |
| 1139 | std::string name; // less than 255 bytes long |
no test coverage detected