svn merge -r 15392:15551 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / blenkernel / intern / image.c
index c73279746fb909110661db33a6a12c677b3e2c72..b6c8ad59e0801a23a88af998612a72fb2b75d9fc 100644 (file)
@@ -848,10 +848,6 @@ void BKE_add_image_extension(char *string, int imtype)
                if(!BLI_testextensie(string, ".tga"))
                        extension= ".tga";
        }
-       else if(ELEM5(imtype, R_MOVIE, R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90)) {
-               if(!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg")))
-                       extension= ".jpg";
-       }
        else if(imtype==R_BMP) {
                if(!BLI_testextensie(string, ".bmp"))
                        extension= ".bmp";
@@ -874,10 +870,14 @@ void BKE_add_image_extension(char *string, int imtype)
                if (!BLI_testextensie(string, ".dpx"))
                        extension= ".dpx";
        }
-       else {  /* targa default */
+       else if(imtype==R_TARGA) {
                if(!BLI_testextensie(string, ".tga"))
                        extension= ".tga";
        }
+       else { //   R_MOVIE, R_AVICODEC, R_AVIRAW, R_AVIJPEG, R_JPEG90, R_QUICKTIME etc
+               if(!( BLI_testextensie(string, ".jpg") || BLI_testextensie(string, ".jpeg")))
+                       extension= ".jpg";
+       }
 
        strcat(string, extension);
 }
@@ -1512,6 +1512,10 @@ static ImBuf *image_load_sequence_file(Image *ima, ImageUser *iuser, int frame)
                image_initialize_after_load(ima, ibuf);
                image_assign_ibuf(ima, ibuf, 0, frame);
 #endif
+               
+               if(ima->flag & IMA_DO_PREMUL)
+                       converttopremul(ibuf);
+               
        }
        else
                ima->ok= 0;