+ return result;
+}
+
+static int load_sequence_querystring( producer_pixbuf self, mlt_properties properties, const char *filename )
+{
+ int result = 0;
+
+ // Obtain filenames with pattern and begin value in query string
+ if ( strchr( filename, '%' ) && strchr( filename, '?' ) )
+ {
+ // Split filename into pattern and query string
+ char *s = strdup( filename );
+ char *querystring = strrchr( s, '?' );
+ *querystring++ = '\0';
+ if ( strstr( filename, "begin=" ) )
+ mlt_properties_set( properties, "begin", strstr( querystring, "begin=" ) + 6 );
+ else if ( strstr( filename, "begin:" ) )
+ mlt_properties_set( properties, "begin", strstr( querystring, "begin:" ) + 6 );
+ // Coerce to an int value so serialization does not have any extra query string cruft
+ mlt_properties_set_int( properties, "begin", mlt_properties_get_int( properties, "begin" ) );
+ result = load_sequence_sprintf( self, properties, s );
+ free( s );
+ }
+ return result;
+}
+
+static int load_folder( producer_pixbuf self, mlt_properties properties, const char *filename )
+{
+ int result = 0;
+
+ // Obtain filenames with folder
+ if ( strstr( filename, "/.all." ) != NULL )
+ {
+ char wildcard[ 1024 ];
+ char *dir_name = strdup( filename );
+ char *extension = strrchr( dir_name, '.' );
+
+ *( strstr( dir_name, "/.all." ) + 1 ) = '\0';
+ sprintf( wildcard, "*%s", extension );
+
+ mlt_properties_dir_list( self->filenames, dir_name, wildcard, 1 );
+
+ free( dir_name );
+ result = 1;
+ }
+ return result;
+}
+
+static void load_filenames( producer_pixbuf self, mlt_properties properties )
+{
+ char *filename = mlt_properties_get( properties, "resource" );
+ self->filenames = mlt_properties_new( );
+
+ if (!load_svg( self, properties, filename ) &&
+ !load_sequence_querystring( self, properties, filename ) &&
+ !load_sequence_sprintf( self, properties, filename ) &&
+ !load_sequence_deprecated( self, properties, filename ) &&
+ !load_folder( self, properties, filename ) )
+ {
+ mlt_properties_set( self->filenames, "0", filename );
+ }
+ self->count = mlt_properties_count( self->filenames );
+}
+
+static GdkPixbuf* reorient_with_exif( producer_pixbuf self, int image_idx, GdkPixbuf *pixbuf )
+{
+#ifdef USE_EXIF
+ mlt_properties producer_props = MLT_PRODUCER_PROPERTIES( &self->parent );
+ ExifData *d = exif_data_new_from_file( mlt_properties_get_value( self->filenames, image_idx ) );
+ ExifEntry *entry;
+ int exif_orientation = 0;
+
+ /* get orientation and rotate image accordingly if necessary */
+ if (d)