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:
authorTon Roosendaal <ton@blender.org>2006-12-21 13:41:43 +0300
committerTon Roosendaal <ton@blender.org>2006-12-21 13:41:43 +0300
commitb12927ecb87b68387b7126283abf5bee7845cde4 (patch)
tree2d830777917517fda87a7a9a541d7950cb57798e /source/blender/imbuf/intern/openexr
parent96dd39b84f551bbb2f9adfd024dbaeafa22f5e49 (diff)
MultiLayer images: added support for choosing compression type.
Without setting anything, it uses ZIP now as default, which gives the best lossless compression and works nice fast.
Diffstat (limited to 'source/blender/imbuf/intern/openexr')
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_api.cpp6
-rw-r--r--source/blender/imbuf/intern/openexr/openexr_multi.h4
2 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/openexr/openexr_api.cpp b/source/blender/imbuf/intern/openexr/openexr_api.cpp
index 833008c3d7e..c035862c23f 100644
--- a/source/blender/imbuf/intern/openexr/openexr_api.cpp
+++ b/source/blender/imbuf/intern/openexr/openexr_api.cpp
@@ -173,7 +173,7 @@ static void openexr_header_compression(Header *header, int compression)
header->compression() = RLE_COMPRESSION;
break;
default:
- header->compression() = NO_COMPRESSION;
+ header->compression() = ZIP_COMPRESSION;
break;
}
}
@@ -430,7 +430,7 @@ void IMB_exr_add_channel(void *handle, const char *layname, const char *passname
BLI_addtail(&data->channels, echan);
}
-void IMB_exr_begin_write(void *handle, char *filename, int width, int height)
+void IMB_exr_begin_write(void *handle, char *filename, int width, int height, int compress)
{
ExrHandle *data= (ExrHandle *)handle;
Header header (width, height);
@@ -442,7 +442,7 @@ void IMB_exr_begin_write(void *handle, char *filename, int width, int height)
for(echan= (ExrChannel *)data->channels.first; echan; echan= echan->next)
header.channels().insert (echan->name, Channel (FLOAT));
- header.compression() = RLE_COMPRESSION;
+ openexr_header_compression(&header, compress);
header.insert ("BlenderMultiChannel", StringAttribute ("Blender V2.43"));
diff --git a/source/blender/imbuf/intern/openexr/openexr_multi.h b/source/blender/imbuf/intern/openexr/openexr_multi.h
index feceb227e4b..b9aa81e81da 100644
--- a/source/blender/imbuf/intern/openexr/openexr_multi.h
+++ b/source/blender/imbuf/intern/openexr/openexr_multi.h
@@ -45,7 +45,7 @@ void * IMB_exr_get_handle (void);
void IMB_exr_add_channel (void *handle, const char *layname, const char *passname, int xstride, int ystride, float *rect);
int IMB_exr_begin_read (void *handle, char *filename, int *width, int *height);
-void IMB_exr_begin_write (void *handle, char *filename, int width, int height);
+void IMB_exr_begin_write (void *handle, char *filename, int width, int height, int compress);
void IMB_exrtile_begin_write (void *handle, char *filename, int width, int height, int tilex, int tiley);
void IMB_exr_set_channel (void *handle, char *layname, char *passname, int xstride, int ystride, float *rect);
@@ -69,7 +69,7 @@ void * IMB_exr_get_handle (void) {return NULL;}
void IMB_exr_add_channel (void *handle, const char *layname, const char *channame, int xstride, int ystride, float *rect) {}
int IMB_exr_begin_read (void *handle, char *filename, int *width, int *height) {return 0;}
-void IMB_exr_begin_write (void *handle, char *filename, int width, int height) {}
+void IMB_exr_begin_write (void *handle, char *filename, int width, int height, int compress) {}
void IMB_exrtile_begin_write (void *handle, char *filename, int width, int height, int tilex, int tiley) {}
void IMB_exr_set_channel (void *handle, char *layname, char *channame, int xstride, int ystride, float *rect) {}