rev 3656 - in kde-extras/digikam/trunk/debian: . patches

Achim Bohnet ach-guest at costa.debian.org
Mon Apr 24 22:05:21 UTC 2006


Author: ach-guest
Date: 2006-04-24 22:05:20 +0000 (Mon, 24 Apr 2006)
New Revision: 3656

Added:
   kde-extras/digikam/trunk/debian/patches/20_kdesvn_r531782_fix_16bit_tiff_thumbnails.diff
   kde-extras/digikam/trunk/debian/patches/21_kdesvn_r532147_fix_16bit_tiff_umscamera.diff
   kde-extras/digikam/trunk/debian/patches/22_kdesvn_r532959_fix_16bit_tiff_imageeditor.diff
Modified:
   kde-extras/digikam/trunk/debian/changelog
Log:
digikam: Mark is too fast for me ;)  Add three 16bit tiff fixes from upstream svn
	Tested. -2 ready for upload.

Modified: kde-extras/digikam/trunk/debian/changelog
===================================================================
--- kde-extras/digikam/trunk/debian/changelog	2006-04-24 21:05:27 UTC (rev 3655)
+++ kde-extras/digikam/trunk/debian/changelog	2006-04-24 22:05:20 UTC (rev 3656)
@@ -1,3 +1,13 @@
+digikam (0.8.1+0.8.2-beta1-2) unstable; urgency=low
+
+  [ Achim Bohnet ]
+  * Pull some fixes from upstream svn:
+    + 20_kdesvn_r531782_fix_16bit_tiff_thumbnails.diff
+    + 21_kdesvn_r532147_fix_16bit_tiff_umscamera.diff
+    + 22_kdesvn_r532959_fix_16bit_tiff_imageeditor.diff
+
+ -- Debian KDE Extras Team <pkg-kde-extras at lists.alioth.debian.org>  Mon, 24 Apr 2006 23:29:16 +0200
+
 digikam (0.8.1+0.8.2-beta1-1) unstable; urgency=low
 
   [ Achim Bohnet ]

Added: kde-extras/digikam/trunk/debian/patches/20_kdesvn_r531782_fix_16bit_tiff_thumbnails.diff
===================================================================
--- kde-extras/digikam/trunk/debian/patches/20_kdesvn_r531782_fix_16bit_tiff_thumbnails.diff	2006-04-24 21:05:27 UTC (rev 3655)
+++ kde-extras/digikam/trunk/debian/patches/20_kdesvn_r531782_fix_16bit_tiff_thumbnails.diff	2006-04-24 22:05:20 UTC (rev 3656)
@@ -0,0 +1,225 @@
+Index: digikam/kioslave/digikamthumbnail.cpp
+===================================================================
+--- digikam/kioslave/digikamthumbnail.cpp	(revision 531781)
++++ digikam/kioslave/digikamthumbnail.cpp	(revision 531782)
+@@ -1,30 +1,27 @@
+-//////////////////////////////////////////////////////////////////////////////
+-//
+-//    DIGIKAMTHUMBNAIL.CPP
+-//
+-//    Copyright (C) 2003-2004 Renchi Raju <renchi at pooh.tam.uiuc.edu>
+-//                            Gilles CAULIER <caulier dot gilles at free.fr>
+-//
+-//    This program is free software; you can redistribute it and/or modify
+-//    it under the terms of the GNU General Public License as published by
+-//    the Free Software Foundation; either version 2 of the License, or
+-//    (at your option) any later version.
+-//
+-//    This program is distributed in the hope that it will be useful,
+-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-//    GNU General Public License for more details.
+-//
+-//    You should have received a copy of the GNU General Public License
+-//    along with this program; if not, write to the Free Software
+-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+-//
+-//////////////////////////////////////////////////////////////////////////////
++/* ============================================================
++ * Authors: Renchi Raju <renchi at pooh.tam.uiuc.edu>
++ *          Gilles Caulier <caulier dot gilles at kdemail dot net> 
++ * Date   : 2003-01-15
++ * Description : digiKam KIO slave to get image thumbnails.
++ *
++ * Copyright 2003-2005 by Renchi Raju, Gilles Caulier
++ * Copyright 2006      by Gilles Caulier
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ * 
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * ============================================================ */
+ 
+ #define XMD_H
+ 
+-#include <digikam_export.h>
+-
+ // Qt Includes.
+ 
+ #include <qcstring.h>
+@@ -32,6 +29,7 @@
+ #include <qimage.h>
+ #include <qdatastream.h>
+ #include <qfile.h>
++#include <qfileinfo.h>
+ #include <qdir.h>
+ #include <qwmatrix.h>
+ #include <qregexp.h>
+@@ -80,6 +78,7 @@
+ 
+ #include "dcraw_parse.h"
+ #include "digikamthumbnail.h"
++#include "digikam_export.h"
+ 
+ #define X_DISPLAY_MISSING 1
+ #include <Imlib2.h>
+@@ -342,20 +341,25 @@
+ 
+     if (regenerate)
+     {
+-        // Try JPEG loading...
+-        if ( !loadJPEG(img, url.path()) )
++        // In first we trying to load image using the file extension. This is mandatory because
++        // some tiff files are detected like RAW files by dcraw::parse method.
++        if ( !loadByExtension(img, url.path()) )
+         {
+-            // Try to load with imlib2
+-            if ( !loadImlib2(img, url.path()) )
++            // Try JPEG loading...
++            if ( !loadJPEG(img, url.path()) )
+             {
+-                // Try to load with QT/KDELib
+-                if (!img.load(url.path()))
++                // Try to load with dcraw : RAW files.
++                if ( !loadDCRAW(img, url.path()) )
+                 {
+-                    // Try to load with KDE thumbcreators
+-                    if (!loadKDEThumbCreator(img, url.path()))
++                    // Try to load with imlib2 : TIFF, PNG, etc.
++                    if ( !loadImlib2(img, url.path()) )
+                     {
+-                        // Try to load with dcraw
+-                        loadDCRAW( img, url.path() );
++                        // Try to load with QT/KDELib
++                        if ( !img.load(url.path()) )
++                        {
++                            // Try to load with KDE thumbcreators : video files and others stuff.
++                            loadKDEThumbCreator(img, url.path());
++                        }
+                     }
+                 }
+             }
+@@ -436,7 +440,24 @@
+     finished();
+ }
+ 
++bool kio_digikamthumbnailProtocol::loadByExtension(QImage& image, const QString& path)
++{
++    QFileInfo fileInfo(path);
++    if (!fileInfo.exists())
++        return false;
++    
++    QString ext = fileInfo.extension().upper();
+ 
++    if (ext == QString("JPEG") || ext == QString("JPG"))
++        return (loadJPEG(image, path));
++    else if (ext == QString("PNG"))
++        return (image.load(path));
++    else if (ext == QString("TIFF") || ext == QString("TIF"))
++        return (image.load(path));
++    
++    return false;
++}
++
+ /////////////////////////////////////////////////////////////////////////////////////////
+ // JPEG Extraction
+ 
+Index: digikam/kioslave/digikamthumbnail.h
+===================================================================
+--- digikam/kioslave/digikamthumbnail.h	(revision 531781)
++++ digikam/kioslave/digikamthumbnail.h	(revision 531782)
+@@ -1,25 +1,24 @@
+-//////////////////////////////////////////////////////////////////////////////
+-//
+-//    DIGIKAMTHUMBNAIL.H
+-//
+-//    Copyright (C) 2003-2004 Renchi Raju <renchi at pooh.tam.uiuc.edu>
+-//                            Gilles CAULIER <caulier dot gilles at free.fr>
+-//
+-//    This program is free software; you can redistribute it and/or modify
+-//    it under the terms of the GNU General Public License as published by
+-//    the Free Software Foundation; either version 2 of the License, or
+-//    (at your option) any later version.
+-//
+-//    This program is distributed in the hope that it will be useful,
+-//    but WITHOUT ANY WARRANTY; without even the implied warranty of
+-//    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+-//    GNU General Public License for more details.
+-//
+-//    You should have received a copy of the GNU General Public License
+-//    along with this program; if not, write to the Free Software
+-//    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+-//
+-//////////////////////////////////////////////////////////////////////////////
++/* ============================================================
++ * Authors: Renchi Raju <renchi at pooh.tam.uiuc.edu>
++ *          Gilles Caulier <caulier dot gilles at kdemail dot net> 
++ * Date   : 2003-01-15
++ * Description : digiKam KIO slave to get image thumbnails.
++ * 
++ * Copyright 2003-2005 by Renchi Raju, Gilles Caulier
++ * Copyright 2006      by Gilles Caulier
++ *
++ * This program is free software; you can redistribute it
++ * and/or modify it under the terms of the GNU General
++ * Public License as published by the Free Software Foundation;
++ * either version 2, or (at your option)
++ * any later version.
++ * 
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ * 
++ * ============================================================ */
+ 
+ #ifndef _digikamthumbnail_H_
+ #define _digikamthumbnail_H_
+@@ -36,6 +35,7 @@
+ 
+ class kio_digikamthumbnailProtocol : public KIO::SlaveBase
+ {
++
+ public:
+ 
+     kio_digikamthumbnailProtocol(int argc, char** argv);
+@@ -44,22 +44,25 @@
+ 
+ private:
+ 
++    bool loadByExtension(QImage& image, const QString& path);
+     bool loadJPEG(QImage& image, const QString& path);
+     bool loadImlib2(QImage& image, const QString& path);
+     bool loadKDEThumbCreator(QImage& image, const QString& path);
+     bool loadDCRAW(QImage& image,  const QString& path);
+     void createThumbnailDirs();
+ 
+-    int  cachedSize_;
++private:
+ 
+-    int org_width_;
+-    int org_height_;
+-    int new_width_;
+-    int new_height_;
++    int           cachedSize_;
+ 
+-    QString smallThumbPath_;
+-    QString bigThumbPath_;
++    int           org_width_;
++    int           org_height_;
++    int           new_width_;
++    int           new_height_;
+ 
++    QString       smallThumbPath_;
++    QString       bigThumbPath_;
++
+     QApplication *app_;
+     int           argc_;
+     char**        argv_;

Added: kde-extras/digikam/trunk/debian/patches/21_kdesvn_r532147_fix_16bit_tiff_umscamera.diff
===================================================================
--- kde-extras/digikam/trunk/debian/patches/21_kdesvn_r532147_fix_16bit_tiff_umscamera.diff	2006-04-24 21:05:27 UTC (rev 3655)
+++ kde-extras/digikam/trunk/debian/patches/21_kdesvn_r532147_fix_16bit_tiff_umscamera.diff	2006-04-24 22:05:20 UTC (rev 3656)
@@ -0,0 +1,46 @@
+Index: digikam/utilities/cameragui/umscamera.cpp
+===================================================================
+--- digikam/utilities/cameragui/umscamera.cpp	(revision 532146)
++++ digikam/utilities/cameragui/umscamera.cpp	(revision 532147)
+@@ -5,7 +5,7 @@
+  * Description : 
+  * 
+  * Copyright 2004-2005 by Renchi Raju
+- * Copyright 2005 by Gilles Caulier
++ * Copyright 2005-2006 by Gilles Caulier
+  *
+  * This program is free software; you can redistribute it
+  * and/or modify it under the terms of the GNU General
+@@ -138,9 +138,7 @@
+     return true;
+ }
+ 
+-bool UMSCamera::getThumbnail(const QString& folder,
+-                             const QString& itemName,
+-                             QImage& thumbnail)
++bool UMSCamera::getThumbnail(const QString& folder, const QString& itemName, QImage& thumbnail)
+ {
+     m_cancel = false;
+ 
+@@ -173,8 +171,20 @@
+            return true;
+     }   
+ 
+-    // In 3rd we trying to get thumbnail from RAW files using dcraw parse utility.
++    // In 3rd, if file image type is TIFF, load thumb using KDELib API before to use dcraw::parse method 
++    // to prevent broken 16 bits TIFF thumb.
+ 
++    if (fi.extension().upper() == QString("TIFF") ||
++        fi.extension().upper() == QString("TIF"))
++    {
++        thumbnail.load(folder + "/" + itemName);
++    
++        if (!thumbnail.isNull())
++            return true;
++    }
++
++    // In 4th we trying to get thumbnail from RAW files using dcraw parse utility.
++
+     KTempFile thumbFile(QString::null, "camerarawthumb");
+     thumbFile.setAutoDelete(true);
+     Digikam::DcrawParse rawFileParser;

Added: kde-extras/digikam/trunk/debian/patches/22_kdesvn_r532959_fix_16bit_tiff_imageeditor.diff
===================================================================
--- kde-extras/digikam/trunk/debian/patches/22_kdesvn_r532959_fix_16bit_tiff_imageeditor.diff	2006-04-24 21:05:27 UTC (rev 3655)
+++ kde-extras/digikam/trunk/debian/patches/22_kdesvn_r532959_fix_16bit_tiff_imageeditor.diff	2006-04-24 22:05:20 UTC (rev 3656)
@@ -0,0 +1,12 @@
+Index: digikam/utilities/imageeditor/imlibinterface.cpp
+===================================================================
+--- digikam/utilities/imageeditor/imlibinterface.cpp	(revision 532958)
++++ digikam/utilities/imageeditor/imlibinterface.cpp	(revision 532959)
+@@ -294,7 +294,6 @@
+         }    
+         
+         case JPEG_IMAGE:
+-        case TIFF_IMAGE:
+         case PNG_IMAGE:
+         {
+             // Try to load image using imlib2.




More information about the pkg-kde-commits mailing list