diff options
author | Quentin Wenger <matpi@protonmail.ch> | 2016-01-14 13:02:13 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2016-01-14 13:33:46 +0300 |
commit | 370a8ee7417f37bbedf814582d9f14e855da0c3e (patch) | |
tree | 6419c5126e0d3b62b1ffc3fa7443a2a9eadfb372 /source/blender/makesrna/intern/rna_scene.c | |
parent | 1f273cec00feddb1065847e3c8163cdcf8a6d89a (diff) |
Add compression modes for TIFF images
This patch aims at providing multiple compression modes for TIFF output,
particularly uncompressed mode.
At this moment have None, Deflate, LZW and Pack Bits modes been integrated,
mimicking The GIMP export modes (except JPEG mode, which returned encoding
errors).
More modes could be added if needed.
Default remains Deflate.
Reviewers: campbellbarton, mont29, sergey
Differential Revision: https://developer.blender.org/D1709
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index a0ff429a7e2..f7f6204113f 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -4580,6 +4580,16 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) }; #endif +#ifdef WITH_TIFF + static EnumPropertyItem tiff_codec_items[] = { + {R_IMF_TIFF_CODEC_NONE, "NONE", 0, "None", ""}, + {R_IMF_TIFF_CODEC_DEFLATE, "DEFLATE", 0, "Deflate", ""}, + {R_IMF_TIFF_CODEC_LZW, "LZW", 0, "LZW", ""}, + {R_IMF_TIFF_CODEC_PACKBITS, "PACKBITS", 0, "Pack Bits", ""}, + {0, NULL, 0, NULL, NULL} + }; +#endif + StructRNA *srna; PropertyRNA *prop; @@ -4679,6 +4689,15 @@ static void rna_def_scene_image_format_data(BlenderRNA *brna) RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); #endif +#ifdef WITH_TIFF + /* TIFF */ + prop = RNA_def_property(srna, "tiff_codec", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "tiff_codec"); + RNA_def_property_enum_items(prop, tiff_codec_items); + RNA_def_property_ui_text(prop, "Compression", "Compression mode for TIFF"); + RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL); +#endif + /* Cineon and DPX */ prop = RNA_def_property(srna, "use_cineon_log", PROP_BOOLEAN, PROP_NONE); |