Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/BKE_image.h2
-rw-r--r--source/blender/blenkernel/intern/image.c6
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/blenkernel/BKE_image.h b/source/blender/blenkernel/BKE_image.h
index e36d4bab566..f7fd7450734 100644
--- a/source/blender/blenkernel/BKE_image.h
+++ b/source/blender/blenkernel/BKE_image.h
@@ -73,7 +73,7 @@ int BKE_imtype_supports_zbuf(const char imtype);
int BKE_imtype_supports_compress(const char imtype);
int BKE_imtype_supports_quality(const char imtype);
int BKE_imtype_requires_linear_float(const char imtype);
-char BKE_imtype_valid_channels(const char imtype);
+char BKE_imtype_valid_channels(const char imtype, bool write_file);
char BKE_imtype_valid_depths(const char imtype);
char BKE_imtype_from_arg(const char *arg);
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 7d8ada0fa68..b74424a1d28 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -1161,16 +1161,18 @@ int BKE_imtype_requires_linear_float(const char imtype)
return 0;
}
-char BKE_imtype_valid_channels(const char imtype)
+char BKE_imtype_valid_channels(const char imtype, bool write_file)
{
char chan_flag = IMA_CHAN_FLAG_RGB; /* assume all support rgb */
/* alpha */
switch (imtype) {
+ case R_IMF_IMTYPE_BMP:
+ if (write_file) break;
+ /* fall-through */
case R_IMF_IMTYPE_TARGA:
case R_IMF_IMTYPE_IRIS:
case R_IMF_IMTYPE_PNG:
- /* case R_IMF_IMTYPE_BMP: */ /* read but not write */
case R_IMF_IMTYPE_RADHDR:
case R_IMF_IMTYPE_TIFF:
case R_IMF_IMTYPE_OPENEXR: