[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [26272] trunk/blender/source/blender: Fix [#20821] COLOR MANAGEMENT: Corrupts motion picture files

Matt Ebb matt at mke3.net
Tue Jan 26 03:49:37 CET 2010


Revision: 26272
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=26272
Author:   broken
Date:     2010-01-26 03:49:30 +0100 (Tue, 26 Jan 2010)

Log Message:
-----------
Fix [#20821] COLOR MANAGEMENT: Corrupts motion picture files

Wasn't tagging movie formats with profiles properly.

Modified Paths:
--------------
    trunk/blender/source/blender/imbuf/intern/anim.c
    trunk/blender/source/blender/imbuf/intern/anim5.c
    trunk/blender/source/blender/quicktime/apple/qtkit_import.m
    trunk/blender/source/blender/quicktime/apple/quicktime_import.c

Modified: trunk/blender/source/blender/imbuf/intern/anim.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/anim.c	2010-01-26 02:41:10 UTC (rev 26271)
+++ trunk/blender/source/blender/imbuf/intern/anim.c	2010-01-26 02:49:30 UTC (rev 26272)
@@ -504,6 +504,8 @@
 		MEM_freeN (tmp);
 	}
 
+	ibuf->profile = IB_PROFILE_SRGB;
+		
 	return ibuf;
 }
 
@@ -881,6 +883,8 @@
 		IMB_filtery(ibuf);
 	}
 
+	ibuf->profile = IB_PROFILE_SRGB;
+	
 	return(ibuf);
 }
 
@@ -1069,6 +1073,7 @@
 			if (nextanim5(anim)) return (0);
 		}
 		ibuf = anim5_fetchibuf(anim);
+		ibuf->profile = IB_PROFILE_SRGB;
 		break;
 	case ANIM_SEQUENCE:
 		pic = an_stringdec(anim->first, head, tail, &digits);
@@ -1089,22 +1094,26 @@
 		if (ibuf) {
 			anim->curposition = position;
 			IMB_convert_rgba_to_abgr(ibuf);
+			ibuf->profile = IB_PROFILE_SRGB;
 		}
 		break;
 	case ANIM_AVI:
 		ibuf = avi_fetchibuf(anim, position);
-		if (ibuf) anim->curposition = position;
+		if (ibuf)
+			anim->curposition = position;
 		break;
 #ifdef WITH_QUICKTIME
 	case ANIM_QTIME:
 		ibuf = qtime_fetchibuf(anim, position);
-		if (ibuf) anim->curposition = position;
+		if (ibuf)
+			anim->curposition = position;
 		break;
 #endif
 #ifdef WITH_FFMPEG
 	case ANIM_FFMPEG:
 		ibuf = ffmpeg_fetchibuf(anim, position);
-		if (ibuf) anim->curposition = position;
+		if (ibuf)
+			anim->curposition = position;
 		filter_y = 0; /* done internally */
 		break;
 #endif

Modified: trunk/blender/source/blender/imbuf/intern/anim5.c
===================================================================
--- trunk/blender/source/blender/imbuf/intern/anim5.c	2010-01-26 02:41:10 UTC (rev 26271)
+++ trunk/blender/source/blender/imbuf/intern/anim5.c	2010-01-26 02:49:30 UTC (rev 26272)
@@ -532,6 +532,8 @@
 	ibuf = IMB_dupImBuf(anim->ibuf1);
 	planes_to_rect(ibuf, anim->ib_flags);
 
+	ibuf->profile = IB_PROFILE_SRGB;
+	
 	return(ibuf);
 }
 

Modified: trunk/blender/source/blender/quicktime/apple/qtkit_import.m
===================================================================
--- trunk/blender/source/blender/quicktime/apple/qtkit_import.m	2010-01-26 02:41:10 UTC (rev 26271)
+++ trunk/blender/source/blender/quicktime/apple/qtkit_import.m	2010-01-26 02:49:30 UTC (rev 26272)
@@ -281,6 +281,8 @@
 
 	ibuf = nsImageToiBuf(frameImage,anim->x, anim->y);
 	[pool drain];
+	
+	ibuf->profile = IB_PROFILE_SRGB;
 	return ibuf;
 }
 

Modified: trunk/blender/source/blender/quicktime/apple/quicktime_import.c
===================================================================
--- trunk/blender/source/blender/quicktime/apple/quicktime_import.c	2010-01-26 02:41:10 UTC (rev 26271)
+++ trunk/blender/source/blender/quicktime/apple/quicktime_import.c	2010-01-26 02:49:30 UTC (rev 26272)
@@ -373,6 +373,8 @@
 	}
 #endif
 
+	ibuf->profile == IB_PROFILE_SRGB;
+	
 	IMB_flipy(ibuf);
 	return ibuf;
 }





More information about the Bf-blender-cvs mailing list