]> git.sesse.net Git - mlt/commitdiff
Store exif orientation.
authorj-b-m <jb@kdenlive.org>
Sat, 19 Feb 2011 21:39:19 +0000 (13:39 -0800)
committerDan Dennedy <dan@dennedy.org>
Sat, 19 Feb 2011 21:39:19 +0000 (13:39 -0800)
Patch attached internally stores the exif orientation so that it can be
accessible to the framework and apps using it.

Useful it in Kdenlive to correctly rotate images when creating proxy
images.

src/modules/gtk2/producer_pixbuf.c
src/modules/qimage/qimage_wrapper.cpp

index ab4aa66c0e9178ff1cec1a8522b7d3752fd989ae..8b8a803645601fc57f8d6ecfae40da3ff5b79888 100644 (file)
@@ -303,6 +303,9 @@ static void refresh_image( producer_pixbuf this, mlt_frame frame, int width, int
                                        /* Free the EXIF data */
                                        exif_data_unref(d);
                                }
+                               
+                               // Remember EXIF value, might be useful for someone
+                               mlt_properties_set_int( producer_props, "_exif_orientation" , exif_orientation );
 
                                if ( exif_orientation > 1 )
                                {
index f55cfadcff608713184ce1ac0112385d5a6ba555..f469877b65676e870ac02e456b1f0c6bd77f257b 100644 (file)
@@ -187,6 +187,9 @@ void refresh_qimage( producer_qimage self, mlt_frame frame, int width, int heigh
                                        exif_data_unref(d);
                                }
 
+                               // Remember EXIF value, might be useful for someone
+                               mlt_properties_set_int( producer_props, "_exif_orientation" , exif_orientation );
+                                     
                                if ( exif_orientation > 1 )
                                {
                                      // Rotate image according to exif data