+ char temp[ 512 ];
+ char *extension = strrchr( resource, '.' );
+
+ if ( strchr( resource, '%' ) )
+ {
+ FILE *test;
+ sprintf( temp, "%s/lumas/%s/%s", mlt_environment( "MLT_DATA" ), mlt_environment( "MLT_NORMALISATION" ), strchr( resource, '%' ) + 1 );
+ test = fopen( temp, "r" );
+ if ( test == NULL )
+ strcat( temp, ".png" );
+ else
+ fclose( test );
+ resource = temp;
+ extension = strrchr( resource, '.' );
+ }