Fix T53499: Cannot load DPX files
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Dec 2017 13:07:57 +0000 (14:07 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 7 Dec 2017 13:07:57 +0000 (14:07 +0100)
The issue was caused by unspecified color transfer. New behavior gives same
result as other viewers here, so likely is fine :)

source/blender/imbuf/intern/cineon/logImageCore.c

index 600642f5e44304a9dfa190fde6c92bff4873dee2..7b5dec4da4102b4c4b5664178862dc768b0286d5 100644 (file)
@@ -1020,6 +1020,7 @@ static int convertRGBA_RGB(float *src, float *dst, LogImageFile *logImage,
        float *dst_ptr = dst;
 
        switch (logElement.transfer) {
+               case transfer_Unspecified:
                case transfer_UserDefined:
                case transfer_Linear:
                case transfer_Logarithmic: {
@@ -1054,6 +1055,7 @@ static int convertRGBA_RGB(float *src, float *dst, LogImageFile *logImage,
                }
 
                default:
+                       if (verbose) printf("DPX/Cineon: Unknown transfer %d.\n", logElement.transfer);
                        return 1;
        }
 }
@@ -1066,6 +1068,7 @@ static int convertRGB_RGBA(float *src, float *dst, LogImageFile *logImage,
        float *dst_ptr = dst;
 
        switch (logElement.transfer) {
+               case transfer_Unspecified:
                case transfer_UserDefined:
                case transfer_Linear:
                case transfer_Logarithmic: {
@@ -1100,6 +1103,7 @@ static int convertRGB_RGBA(float *src, float *dst, LogImageFile *logImage,
                }
 
                default:
+                       if (verbose) printf("DPX/Cineon: Unknown transfer %d.\n", logElement.transfer);
                        return 1;
        }
 }