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

List:       kde-commits
Subject:    [calligra] krita/plugins/formats/psd: Fix loading resolution for psd images
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2012-11-08 6:06:00
Message-ID: 20121108060600.8A760A6091 () git ! kde ! org
[Download RAW message or body]

Git commit e2fc42e89603b10ab0afcc3027e80ae33d6423c7 by Boudewijn Rempt.
Committed on 08/11/2012 at 07:05.
Pushed by rempt into branch 'master'.

Fix loading resolution for psd images

We need to convert the value to the internal value in Krita with
POINT_TO_INCH

M  +2    -1    krita/plugins/formats/psd/psd_loader.cpp

http://commits.kde.org/calligra/e2fc42e89603b10ab0afcc3027e80ae33d6423c7

diff --git a/krita/plugins/formats/psd/psd_loader.cpp \
b/krita/plugins/formats/psd/psd_loader.cpp index 82ba7c0..b7bdc61 100644
--- a/krita/plugins/formats/psd/psd_loader.cpp
+++ b/krita/plugins/formats/psd/psd_loader.cpp
@@ -27,6 +27,7 @@
 #include <KoColorModelStandardIds.h>
 #include <KoColorProfile.h>
 #include <KoCompositeOp.h>
+#include <KoUnit.h>
 
 #include <kis_annotation.h>
 #include <kis_types.h>
@@ -142,7 +143,7 @@ KisImageBuilder_Result PSDLoader::decode(const KUrl& uri)
     // set the correct resolution
     RESN_INFO_1005 *resInfo = \
dynamic_cast<RESN_INFO_1005*>(resourceSection.resources[PSDResourceSection::RESN_INFO]->resource);
  if (resInfo) {
-        m_image->setResolution(resInfo->hRes, resInfo->vRes);
+        m_image->setResolution(POINT_TO_INCH(resInfo->hRes), \
                POINT_TO_INCH(resInfo->vRes));
         // let's skip the unit for now; we can only set that on the KoDocument, and \
krita doesn't use it.  }
 


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

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