[Digikam-devel] extragear/graphics/digikam

Gilles Caulier caulier.gilles at free.fr
Thu Aug 17 11:07:17 BST 2006


SVN commit 573833 by cgilles:

digikam from trunk: add "*.jpe" file extension. Some camera use this file extension to identify JPEG files
 taken in enhanced color mode (with my Dynax 5D, .jpe pictures are taken in AdobeRGB with the ICC right color profile embeded.)
 CCMAIL: digikam-devel at kde.org


 M  +1 -1      digikam/albumsettings.cpp  
 M  +1 -1      kioslave/digikamthumbnail.cpp  
 M  +2 -2      libs/dimg/dimg.cpp  
 M  +3 -0      showfoto/showfoto.cpp  
 M  +2 -2      utilities/cameragui/dkcamera.cpp  
 M  +4 -2      utilities/imageeditor/canvas/dimginterface.cpp  
 M  +5 -1      utilities/imageeditor/editor/editorwindow.cpp  


--- trunk/extragear/graphics/digikam/digikam/albumsettings.cpp #573832:573833
@@ -130,7 +130,7 @@
     d->albumSortOrder  = AlbumSettings::ByFolder;
     d->imageSortOrder  = AlbumSettings::ByIName;
                                           
-    d->imageFilefilter = "*.png *.jpg *.jpeg *.tif *.tiff *.gif *.bmp *.xpm *.ppm *.pnm *.xcf *.pcx";
+    d->imageFilefilter = "*.png *.jpg *.jpeg *.jpe *.tif *.tiff *.gif *.bmp *.xpm *.ppm *.pnm *.xcf *.pcx";
     d->movieFilefilter = "*.mpeg *.mpg *.avi *.mov *.wmf *.asf";
     d->audioFilefilter = "*.ogg *.mp3 *.wma *.wav";
     
--- trunk/extragear/graphics/digikam/kioslave/digikamthumbnail.cpp #573832:573833
@@ -258,7 +258,7 @@
     // Else, use the right way depending of image file extension.
     QString ext = fileInfo.extension().upper();
 
-    if (ext == QString("JPEG") || ext == QString("JPG"))
+    if (ext == QString("JPEG") || ext == QString("JPG") || ext == QString("JPE"))
         return (loadJPEG(image, path));
     else if (ext == QString("PNG"))
         return (loadDImg(image, path));
--- trunk/extragear/graphics/digikam/libs/dimg/dimg.cpp #573832:573833
@@ -388,7 +388,7 @@
 
     QString frm = format.upper();
 
-    if (frm == "JPEG" || frm == "JPG")
+    if (frm == "JPEG" || frm == "JPG" || frm == "JPE" )
     {
         JPEGLoader loader(this);
         return loader.save(filePath, observer);
@@ -435,7 +435,7 @@
 
     QString ext = fileInfo.extension().upper();
 
-    if (ext == QString("JPEG") || ext == QString("JPG"))
+    if (ext == QString("JPEG") || ext == QString("JPG") || ext == QString("JPE"))
         return JPEG;
     else if (ext == QString("PNG"))
         return PNG;
--- trunk/extragear/graphics/digikam/showfoto/showfoto.cpp #573832:573833
@@ -689,7 +689,10 @@
     if ( filter.contains("*.TIFF") )
         filter.append (" *.TIF");
     if ( filter.contains("*.JPEG") )
+    {
         filter.append (" *.JPG");
+        filter.append (" *.JPE");
+    }
 
     // Added RAW files estentions supported by dcraw program and 
     // defines to digikam/libs/dcraw/rawfiles.h
--- trunk/extragear/graphics/digikam/utilities/cameragui/dkcamera.cpp #573832:573833
@@ -79,8 +79,8 @@
 {
     QString ext = fileext;
     
-    // massage known variations of known mimetypes into kde specific ones
-    if (ext == "jpg")
+    // Massage known variations of known mimetypes into kde specific ones
+    if (ext == "jpg" || ext == "jpe")
         ext = "jpeg";
     else if (ext == "tif")
         ext = "tiff";
--- trunk/extragear/graphics/digikam/utilities/imageeditor/canvas/dimginterface.cpp #573832:573833
@@ -498,7 +498,8 @@
     kdDebug() << "Saving to :" << QFile::encodeName(fileName).data() << " (" 
               << mimeType << ")" << endl;
 
-    if ( mimeType.upper() == QString("JPG") || mimeType.upper() == QString("JPEG") ) 
+    if ( mimeType.upper() == QString("JPG") || mimeType.upper() == QString("JPEG") || 
+         mimeType.upper() == QString("JPE")) 
        d->image.setAttribute("quality", iofileSettings->JPEGCompression);
 
     if ( mimeType.upper() == QString("PNG") ) 
@@ -524,7 +525,8 @@
     // will be found into Exiv2.
     // Note : There is no limitation with TIFF and PNG about IPTC byte array size.
 
-    if ( mimeType.upper() != QString("JPG") && mimeType.upper() != QString("JPEG") ) 
+    if ( mimeType.upper() != QString("JPG") && mimeType.upper() != QString("JPEG") && 
+         mimeType.upper() != QString("JPE")) 
         meta.setImagePreview(preview);
 
     // Update Exif thumbnail.
--- trunk/extragear/graphics/digikam/utilities/imageeditor/editor/editorwindow.cpp #573832:573833
@@ -1376,7 +1376,11 @@
                 imgExtPattern.append (" ");
             }    
             imgExtPattern.append (" TIF TIFF");
-            if ( imgExtPattern.contains("JPEG") ) imgExtPattern.append (" JPG");
+            if ( imgExtPattern.contains("JPEG") ) 
+            {
+                imgExtPattern.append (" JPG");
+                imgExtPattern.append (" JPE");
+            }
     
             if ( !imgExtPattern.contains( m_savingContext->format.upper() ) )
             {



More information about the Digikam-devel mailing list