diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-03-11 20:21:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-03-22 16:15:20 +0300 |
commit | 3b5224b57c3cfc39a7998ecfc482e13bd6940e68 (patch) | |
tree | 1111ceb0a6501b7de81d4e0e59b6d424c9773665 /source/blender/blenkernel/BKE_image_format.h | |
parent | 2ebcb7fab3e237b7d00de3088c34780cd24f397b (diff) |
Cleanup: refactor passing of color management settings for image save
Make a copy of ImageFormatData that contains the effective color management
settings, and pass that along to the various functions. This will make it
possible to add more complex logic later.
For compositing nodes, passing along view and display settings through
many functions made it harder to add additional settings, so just get those
from the scene now.
Differential Revision: https://developer.blender.org/D14401
Diffstat (limited to 'source/blender/blenkernel/BKE_image_format.h')
-rw-r--r-- | source/blender/blenkernel/BKE_image_format.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_image_format.h b/source/blender/blenkernel/BKE_image_format.h index 189d2db1b4f..633af54ea4f 100644 --- a/source/blender/blenkernel/BKE_image_format.h +++ b/source/blender/blenkernel/BKE_image_format.h @@ -16,6 +16,7 @@ struct BlendWriter; struct ImbFormatOptions; struct ImageFormatData; struct ImBuf; +struct Scene; /* Init/Copy/Free */ @@ -75,6 +76,22 @@ char BKE_imtype_from_arg(const char *arg); void BKE_image_format_from_imbuf(struct ImageFormatData *im_format, const struct ImBuf *imbuf); void BKE_image_format_to_imbuf(struct ImBuf *ibuf, const struct ImageFormatData *imf); +/* Color Management */ + +void BKE_image_format_color_management_copy(struct ImageFormatData *imf, + const struct ImageFormatData *imf_src); +void BKE_image_format_color_management_copy_from_scene(struct ImageFormatData *imf, + const struct Scene *scene); + +/* Image Output + * + * Initialize an image format that can be used for file writing, including + * color management settings from the scene. */ + +void BKE_image_format_init_for_write(struct ImageFormatData *imf, + const struct Scene *scene_src, + const struct ImageFormatData *imf_src); + #ifdef __cplusplus } #endif |