|
SVN commit 488018 by fjcruz:
Minors changes to use them with real dynamic color mangement support. CCMAIL:[hidden email] M +23 -1 icctransform.cpp M +5 -0 icctransform.h --- trunk/extragear/graphics/digikam/libs/dimg/icctransform.cpp #488017:488018 @@ -67,6 +67,7 @@ { m_embedded_profile = image.getICCProfil(); m_has_profile = true; + kdDebug() << "Has profile" << endl; } else { @@ -93,6 +94,15 @@ m_output_profile = output_profile; } +QString IccTransform::getEmbeddedProfileDescriptor() +{ +kdDebug() << "First open embedded profile" << endl; + cmsHPROFILE tmpProfile = cmsOpenProfileFromMem(m_embedded_profile.data(), (DWORD)m_embedded_profile.size()); + QString embeddedProfileDescriptor =QString(cmsTakeProductDesc(tmpProfile)); + cmsCloseProfile(tmpProfile); + return embeddedProfileDescriptor; +} + void IccTransform::apply(DImg& image) { cmsHPROFILE inprofile=0, outprofile=0, proofprofile=0; @@ -100,9 +110,11 @@ if (m_has_profile) { + kdDebug() << "Second open embedded profile" << endl; inprofile = cmsOpenProfileFromMem(m_embedded_profile.data(), (DWORD)m_embedded_profile.size()); - kdDebug() << "Profile name: " << cmsTakeProductName(inprofile) << endl; +// embeddedProfileDescriptor = QString(cmsTakeProductDesc(inprofile)); + kdDebug() << "Embedded profile name: " << cmsTakeProductDesc(inprofile) << endl; } else { @@ -239,4 +251,14 @@ cmsCloseProfile(proofprofile); } +QString IccTransform::getProfileDescription(QString profile) +{ + + cmsHPROFILE _profile = cmsOpenProfileFromFile(QFile::encodeName(profile), "r"); + QString _description = cmsTakeProductDesc(_profile); + cmsCloseProfile(_profile); + return _description; + +} + } // NameSpace Digikam --- trunk/extragear/graphics/digikam/libs/dimg/icctransform.h #488017:488018 @@ -50,6 +50,11 @@ //Embedded input profile void setProfiles(QString output_profile); //void setProfiles(QString * output_profile, QString * proof_profile); + + //Profile info + QString getProfileDescription(QString profile); + + QString getEmbeddedProfileDescriptor(); private: _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
| Free forum by Nabble | Edit this page |
