[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32061] trunk/blender/source/blender: bugfix [#23948] Alpha from images inside compositor is gone
Campbell Barton
ideasman42 at gmail.com
Wed Sep 22 16:13:34 CEST 2010
Revision: 32061
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32061
Author: campbellbarton
Date: 2010-09-22 16:13:34 +0200 (Wed, 22 Sep 2010)
Log Message:
-----------
bugfix [#23948] Alpha from images inside compositor is gone
also fix memory leak.
Modified Paths:
--------------
trunk/blender/source/blender/blenlib/intern/math_color.c
trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c
Modified: trunk/blender/source/blender/blenlib/intern/math_color.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/math_color.c 2010-09-22 13:43:31 UTC (rev 32060)
+++ trunk/blender/source/blender/blenlib/intern/math_color.c 2010-09-22 14:13:34 UTC (rev 32061)
@@ -393,6 +393,7 @@
{
while(tot--) {
srgb_to_linearrgb_v3_v3(col_to, col_from);
+ col_to[3]= col_from[3];
col_to += 4;
col_from += 4;
}
@@ -402,6 +403,7 @@
{
while(tot--) {
linearrgb_to_srgb_v3_v3(col_to, col_from);
+ col_to[3]= col_from[3];
col_to += 4;
col_from += 4;
}
Modified: trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c
===================================================================
--- trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c 2010-09-22 13:43:31 UTC (rev 32060)
+++ trunk/blender/source/blender/nodes/intern/CMP_nodes/CMP_image.c 2010-09-22 14:13:34 UTC (rev 32061)
@@ -82,7 +82,7 @@
rect= ibuf->rect_float;
}
else {
- rect= MEM_mallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image");
+ rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image");
srgb_to_linearrgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y);
alloc= TRUE;
}
@@ -92,7 +92,7 @@
rect= ibuf->rect_float;
}
else {
- rect= MEM_mallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image");
+ rect= MEM_mapallocN(sizeof(float) * 4 * ibuf->x * ibuf->y, "node_composit_get_image");
linearrgb_to_srgb_rgba_rgba_buf(rect, ibuf->rect_float, ibuf->x * ibuf->y);
alloc= TRUE;
}
@@ -109,8 +109,9 @@
}
else {
/* we put imbuf copy on stack, cbuf knows rect is from other ibuf when freed! */
- stackbuf= alloc_compbuf(ibuf->x, ibuf->y, type, alloc);
+ stackbuf= alloc_compbuf(ibuf->x, ibuf->y, type, FALSE);
stackbuf->rect= rect;
+ stackbuf->malloc= alloc;
}
/*code to respect the premul flag of images; I'm
More information about the Bf-blender-cvs
mailing list