MCPcopy Create free account
hub / github.com/cinder/Cinder / FreeEXRHeader

Function FreeEXRHeader

include/tinyexr/tinyexr.h:8606–8636  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8604}
8605
8606int FreeEXRHeader(EXRHeader *exr_header) {
8607 if (exr_header == NULL) {
8608 return TINYEXR_ERROR_INVALID_ARGUMENT;
8609 }
8610
8611 if (exr_header->channels) {
8612 free(exr_header->channels);
8613 }
8614
8615 if (exr_header->pixel_types) {
8616 free(exr_header->pixel_types);
8617 }
8618
8619 if (exr_header->requested_pixel_types) {
8620 free(exr_header->requested_pixel_types);
8621 }
8622
8623 for (int i = 0; i < exr_header->num_custom_attributes; i++) {
8624 if (exr_header->custom_attributes[i].value) {
8625 free(exr_header->custom_attributes[i].value);
8626 }
8627 }
8628
8629 if (exr_header->custom_attributes) {
8630 free(exr_header->custom_attributes);
8631 }
8632
8633 EXRSetNameAttr(exr_header, NULL);
8634
8635 return TINYEXR_SUCCESS;
8636}
8637
8638void EXRSetNameAttr(EXRHeader* exr_header, const char* name) {
8639 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