Skip to content

Commit

Permalink
Simplify names, improve error messages, fix imath usage in Core (#1086)
Browse files Browse the repository at this point in the history
This is a consistency pass over the names to refer to all pixel data
blocks as chunk, as is outlined in the master OpenEXR file layout
documentation around version 2.0.

Additionally cleans up up some prints, splits an overloaded error enum
into three.

Signed-off-by: Kimball Thurston <[email protected]>
  • Loading branch information
kdt3rd authored Jul 11, 2021
1 parent 0ee08cf commit 017f056
Show file tree
Hide file tree
Showing 27 changed files with 476 additions and 432 deletions.
22 changes: 13 additions & 9 deletions src/lib/OpenEXRCore/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,21 @@ static const char * the_error_code_names[] =
"EXR_ERR_MISSING_REQ_ATTR",
"EXR_ERR_INVALID_ATTR",
"EXR_ERR_NO_ATTR_BY_NAME",
"EXR_ERR_BAD_CHUNK_DATA",
"EXR_ERR_ATTR_TYPE_MISMATCH",
"EXR_ERR_ATTR_SIZE_MISMATCH",
"EXR_ERR_SCAN_TILE_MIXEDAPI",
"EXR_ERR_TILE_SCAN_MIXEDAPI",
"EXR_ERR_MODIFY_SIZE_CHANGE",
"EXR_ERR_ALREADY_WROTE_ATTRS",
"EXR_ERR_PART_NOT_READY",
"EXR_ERR_CHUNK_NOT_READY",
"EXR_ERR_BAD_CHUNK_LEADER",
"EXR_ERR_CORRUPT_CHUNK",
"EXR_ERR_INCORRECT_PART",
"EXR_ERR_INCORRECT_CHUNK",
"EXR_ERR_USE_SCAN_DEEP_WRITE",
"EXR_ERR_USE_TILE_DEEP_WRITE",
"EXR_ERR_USE_SCAN_NONDEEP_WRITE",
"EXR_ERR_USE_TILE_NONDEEP_WRITE",
"EXR_ERR_INVALID_SAMPLE_DATA",
"EXR_ERR_FEATURE_NOT_IMPLEMENTED",
"EXR_ERR_UNKNOWN"
};
Expand All @@ -79,19 +81,21 @@ static const char* the_default_errors[] = {
"Missing required attribute in part header",
"Invalid attribute in part header",
"No attribute by that name in part header",
"Mismatch in chunk data vs computed value",
"Attribute type mismatch",
"Attribute type vs. size mismatch",
"Attempt to use a scanline accessor function for a tiled image",
"Attempt to use a tiled accessor function for a scanline image",
"Attempt to modify a value when in update mode with different size",
"File in write mode, but header already written, can no longer edit attributes",
"Unexpected or corrupt values in data block leader vs computed value",
"Corrupt data block data, unable to decode",
"Previous part not yet finished writing",
"Not able to write chunk yet",
"Use deep scanline chunk writer with the sample count table arguments",
"Use deep tile chunk writer with the sample count table arguments",
"Use non-deep scanline chunk writer with the sample count table arguments",
"Use non-deep tile chunk writer with the sample count table arguments",
"Invalid data block to write at this point",
"Use deep scanline write with the sample count table arguments",
"Use deep tile write with the sample count table arguments",
"Use non-deep scanline write (sample count table invalid for this part type)",
"Use non-deep tile write (sample count table invalid for this part type)",
"Invalid sample data table value",
"Feature not yet implemented, please use C++ library",
"Unknown error code"
};
Expand Down
Loading

0 comments on commit 017f056

Please sign in to comment.