[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    kdeextragear-3/digikam/utilities/imageeditor
From:       Ralf Hoelzer <ralf () well ! com>
Date:       2004-08-10 16:19:52
Message-ID: 20040810161952.E5F209985 () office ! kde ! org
[Download RAW message or body]

CVS commit by rhoezler: 

Save correct orientation tag if image has been EXIF auto-rotated and modified/saved.

CCMAIL: digikam-devel@lists.sourceforge.net


  M +5 -0      canvas.cpp   1.18
  M +1 -0      canvas.h   1.11
  M +1 -1      imagewindow.cpp   1.33
  M +10 -0     imlibinterface.cpp   1.22
  M +3 -1      imlibinterface.h   1.12


--- kdeextragear-3/digikam/utilities/imageeditor/canvas.cpp  #1.17:1.18
@@ -600,4 +600,9 @@ bool Canvas::minZoom()
 }
 
+bool Canvas::exifRotated()
+{
+    return d->im->exifRotated();
+}
+
 void Canvas::slotIncreaseZoom()
 {

--- kdeextragear-3/digikam/utilities/imageeditor/canvas.h  #1.10:1.11
@@ -55,4 +55,5 @@ public:
     bool maxZoom();
     bool minZoom();
+    bool exifRotated();
     int  imageWidth();
     int  imageHeight();

--- kdeextragear-3/digikam/utilities/imageeditor/imagewindow.cpp  #1.32:1.33
@@ -690,5 +690,5 @@ void ImageWindow::slotSave()
         kdWarning() << ("slotSave::No Exif Data Found") << endl;
     
-    if( m_rotatedOrFlipped )
+    if( m_rotatedOrFlipped || m_canvas->exifRotated() )
        KExifUtils::writeOrientation(tmpFile, KExifData::NORMAL);
 

--- kdeextragear-3/digikam/utilities/imageeditor/imlibinterface.cpp  #1.21:1.22
@@ -144,4 +144,6 @@ ImlibInterface::ImlibInterface()
     d->selH = 0;
     d->zoom = 1.0;
+        
+    m_rotatedOrFlipped = false;
 }
 
@@ -211,4 +213,10 @@ bool ImlibInterface::load(const QString&
 
 
+bool ImlibInterface::exifRotated()
+{
+    return m_rotatedOrFlipped;
+}
+
+
 void ImlibInterface::exifRotate(QString filename)
 {
@@ -257,4 +265,6 @@ void ImlibInterface::exifRotate(QString 
                 break;
         }
+
+        m_rotatedOrFlipped = true;
     }
 

--- kdeextragear-3/digikam/utilities/imageeditor/imlibinterface.h  #1.11:1.12
@@ -70,4 +70,5 @@ public:
     int  origHeight();
     bool hasAlpha();    
+    bool exifRotated();
 
     void setSelectedArea(int x, int y, int w, int h);
@@ -105,9 +106,10 @@ private:
     bool saveAction(const QString& saveFile, int JPEGcompression, const QString& mimeType); 
     bool saveTIFF(const QString& saveFile, bool compress);
-    void ImlibInterface::exifRotate(QString filename);
+    void exifRotate(QString filename);
         
     ImlibInterface();
     ImlibInterfacePrivate *d;
     static ImlibInterface *m_instance;
+    bool m_rotatedOrFlipped;
 };
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic