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:
authorKent Mein <mein@cs.umn.edu>2007-06-25 23:50:25 +0400
committerKent Mein <mein@cs.umn.edu>2007-06-25 23:50:25 +0400
commit613646b33e5fde13158a8d8644df8c97bdde2fbb (patch)
tree9b50512d8f6052e28daa54704e4aff112a4ca102 /source/blender/blenkernel/intern
parentddc68225c24bc0754d7b81434b06f509d1f0e106 (diff)
This commit is a modified version of patch #6860
It adds read only dds support. (Writing will come later) Kent
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r--source/blender/blenkernel/intern/Makefile4
-rw-r--r--source/blender/blenkernel/intern/image.c19
2 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/Makefile b/source/blender/blenkernel/intern/Makefile
index a6b14a72690..1d16ebfd4cd 100644
--- a/source/blender/blenkernel/intern/Makefile
+++ b/source/blender/blenkernel/intern/Makefile
@@ -101,6 +101,10 @@ ifeq ($(WITH_OPENEXR), true)
CPPFLAGS += -DWITH_OPENEXR
endif
+ifeq ($(WITH_DDS), true)
+ CPPFLAGS += -DWITH_DDS
+endif
+
ifeq ($(WITH_QUICKTIME), true)
CPPFLAGS += -I../../quicktime
CPPFLAGS += -DWITH_QUICKTIME
diff --git a/source/blender/blenkernel/intern/image.c b/source/blender/blenkernel/intern/image.c
index 21fa38fd83d..dd666163c62 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -633,6 +633,10 @@ int BKE_imtype_to_ftype(int imtype)
return RADHDR;
else if (imtype==R_PNG)
return PNG;
+#ifdef WITH_DDS
+ else if (imtype==R_DDS)
+ return DDS;
+#endif
else if (imtype==R_BMP)
return BMP;
else if (imtype==R_TIFF)
@@ -663,6 +667,10 @@ int BKE_ftype_to_imtype(int ftype)
return R_RADHDR;
else if (ftype & PNG)
return R_PNG;
+#ifdef WITH_DDS
+ else if (ftype & DDS)
+ return R_DDS;
+#endif
else if (ftype & BMP)
return R_BMP;
else if (ftype & TIF)
@@ -719,6 +727,12 @@ void BKE_add_image_extension(char *string, int imtype)
if(!BLI_testextensie(string, ".png"))
extension= ".png";
}
+#ifdef WITH_DDS
+ else if(imtype==R_DDS) {
+ if(!BLI_testextensie(string, ".dds"))
+ extension= ".dds";
+ }
+#endif
else if(imtype==R_RAWTGA) {
if(!BLI_testextensie(string, ".tga"))
extension= ".tga";
@@ -771,6 +785,11 @@ int BKE_write_ibuf(ImBuf *ibuf, char *name, int imtype, int subimtype, int quali
else if ((imtype==R_PNG)) {
ibuf->ftype= PNG;
}
+#ifdef WITH_DDS
+ else if ((imtype==R_DDS)) {
+ ibuf->ftype= DDS;
+ }
+#endif
else if ((imtype==R_BMP)) {
ibuf->ftype= BMP;
}