MCPcopy Create free account
hub / github.com/OpenPathGuidingLibrary/openpgl / FreeEXRHeader

Function FreeEXRHeader

third-party/tinyexr/tinyexr.h:8522–8552  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8520}
8521
8522int FreeEXRHeader(EXRHeader *exr_header) {
8523 if (exr_header == NULL) {
8524 return TINYEXR_ERROR_INVALID_ARGUMENT;
8525 }
8526
8527 if (exr_header->channels) {
8528 free(exr_header->channels);
8529 }
8530
8531 if (exr_header->pixel_types) {
8532 free(exr_header->pixel_types);
8533 }
8534
8535 if (exr_header->requested_pixel_types) {
8536 free(exr_header->requested_pixel_types);
8537 }
8538
8539 for (int i = 0; i < exr_header->num_custom_attributes; i++) {
8540 if (exr_header->custom_attributes[i].value) {
8541 free(exr_header->custom_attributes[i].value);
8542 }
8543 }
8544
8545 if (exr_header->custom_attributes) {
8546 free(exr_header->custom_attributes);
8547 }
8548
8549 EXRSetNameAttr(exr_header, NULL);
8550
8551 return TINYEXR_SUCCESS;
8552}
8553
8554void EXRSetNameAttr(EXRHeader* exr_header, const char* name) {
8555 if (exr_header == NULL) {

Callers 3

EXRLayersFunction · 0.85
LoadEXRWithLayerFunction · 0.85
LoadEXRFromMemoryFunction · 0.85

Calls 1

EXRSetNameAttrFunction · 0.85

Tested by

no test coverage detected