[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [19558] trunk/blender/source/blender/imbuf /intern/scaling.c: Bugfix #18266
Ton Roosendaal
ton at blender.org
Mon Apr 6 11:05:37 CEST 2009
Revision: 19558
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19558
Author: ton
Date: 2009-04-06 11:05:37 +0200 (Mon, 06 Apr 2009)
Log Message:
-----------
Bugfix #18266
Mipmap creation for render crashed, in this case:
- use Curves tool on an Image, which is UV mapped on object
- Save the image to disk, under new name
- Render (F12)
This fix is only for the crash, there's something not well coded
for Curves tool, how it manages float buffers. That's for 2.5.
Modified Paths:
--------------
trunk/blender/source/blender/imbuf/intern/scaling.c
Modified: trunk/blender/source/blender/imbuf/intern/scaling.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/scaling.c 2009-04-06 08:17:04 UTC (rev 19557)
+++ trunk/blender/source/blender/imbuf/intern/scaling.c 2009-04-06 09:05:37 UTC (rev 19558)
@@ -299,7 +299,6 @@
if (ibuf1->rect==NULL && ibuf1->rect_float==NULL) return (0);
do_rect= (ibuf1->rect != NULL);
- do_float= (ibuf1->rect_float != NULL);
if (ibuf1->x <= 1) return(IMB_half_y(ibuf1));
if (ibuf1->y <= 1) return(IMB_half_x(ibuf1));
@@ -312,6 +311,8 @@
p1 = (uchar *) ibuf1->rect;
dest=(uchar *) ibuf2->rect;
+ do_float= (ibuf1->rect_float != NULL && ibuf2->rect_float != NULL);
+
for(y=ibuf2->y;y>0;y--){
if (do_rect) p2 = p1 + (ibuf1->x << 2);
if (do_float) p2f = p1f + (ibuf1->x << 2);
More information about the Bf-blender-cvs
mailing list