SVN commit 500307 by fjcruz:
Some new methods have been implemented to help with icc transformations. CCMAIL:[hidden email] M +76 -22 imageeffect_iccproof.cpp M +23 -0 imageeffect_iccproof.h --- trunk/extragear/graphics/digikam/imageplugins/imageeffect_iccproof.cpp #500306:500307 @@ -79,6 +79,8 @@ proofPath = QString::null; displayPath = QString::null; + hasICC = false; + setHelp("colormanagement.anchor", "digikam"); QFrame *frame = new QFrame(plainPage()); @@ -411,6 +413,7 @@ connect(m_useDisplayDefaultProfile, SIGNAL(clicked()), this, SLOT(slotCMDisabledWarning())); + // ------------------------------------------------------------- enableButtonOK( false ); @@ -499,14 +502,13 @@ bool sb = iface->previewSixteenBit(); Digikam::DImg preview(w, h, sb, a, m_destinationPreviewData); - if (!iface->originalHasICCEmbedded()) + if (iface->getEmbeddedICCFromOriginalImage().isNull()) + { m_useEmbeddedProfile->setEnabled(false); -// Digikam::BCGModifier cmod; -// cmod.setOverIndicator(o); -// cmod.setGamma(g); -// cmod.setBrightness(b); -// cmod.setContrast(c); -// cmod.applyBCG(preview); + hasICC = true; + m_embeddedICC = iface->getEmbeddedICCFromOriginalImage(); + } + iface->putPreviewImage(preview.bits()); m_previewWidget->updatePreview(); @@ -517,11 +519,6 @@ kdDebug() << "Doing updateData" << endl; m_histogramWidget->updateData(m_destinationPreviewData, w, h, sb, 0, 0, 0, false); -// if (original.getICCProfil().isNull()) -// { -// m_useEmbeddedProfile->setEnabled(false); -// } - kapp->restoreOverrideCursor(); } @@ -543,17 +540,9 @@ m_histogramWidget->stopHistogramComputation(); - if (m_destinationPreviewData) - delete [] m_destinationPreviewData; + Digikam::IccTransform transform; -// Digikam::ImageIface* iface = m_previewWidget->imageIface(); -// m_destinationPreviewData = iface->getPreviewData(); - int w = iface->previewWidth(); - int h = iface->previewHeight(); - bool a = iface->previewHasAlpha(); - bool sb = iface->previewSixteenBit(); - - Digikam::DImg preview(w, h, sb, a, m_destinationPreviewData); + kapp->restoreOverrideCursor(); } void ImageEffect_ICCProof::readSettings() @@ -670,6 +659,71 @@ } } +//-- General Tab --------------------------- + +bool ImageEffect_ICCProof::useBPC() +{ + return m_BPCBox->isChecked(); +} + +bool ImageEffect_ICCProof::doProof() +{ + return m_doSoftProofBox->isChecked(); +} + +bool ImageEffect_ICCProof::checkGamut() +{ + return m_checkGamutBox->isChecked(); +} + +bool ImageEffect_ICCProof::embedProfile() +{ + return m_embeddProfileBox->isChecked(); +} + +//-- Input Tab --------------------------- + +bool ImageEffect_ICCProof::useEmbeddedProfile() +{ + return m_useEmbeddedProfile->isChecked(); +} + +bool ImageEffect_ICCProof::useBuiltinProfile() +{ + return m_useSRGBDefaultProfile->isChecked(); +} + +bool ImageEffect_ICCProof::useDefaultInProfile() +{ + return m_useInDefaultProfile->isChecked(); +} + +bool ImageEffect_ICCProof::useSelectedInProfile() +{ + return m_useInSelectedProfile->isChecked(); +} + +//-- Workspace Tab --------------------------- + +bool ImageEffect_ICCProof::useDefaultSpaceProfile() +{ + return m_useSpaceDefaultProfile->isChecked(); +} + +//-- Proofing Tab --------------------------- + +bool ImageEffect_ICCProof::useDefaultProofProfile() +{ + return m_useProofDefaultProfile->isChecked(); +} + +//-- Display Tab --------------------------- + +bool ImageEffect_ICCProof::useDefaultDisplayProfile() +{ + return m_useDisplayDefaultProfile->isChecked(); +} + }// NameSpace DigikamImagesPluginCore #include "imageeffect_iccproof.moc" --- trunk/extragear/graphics/digikam/imageplugins/imageeffect_iccproof.h #500306:500307 @@ -29,6 +29,7 @@ class QHButtonGroup; class QRadioButton; class QPushButton; +class QCString; class KTabWidget; class KURLRequester; @@ -117,7 +118,10 @@ QString proofPath; bool cmEnabled; + bool hasICC; + QByteArray m_embeddedICC; + Digikam::ImageGuideWidget *m_previewWidget; Digikam::ColorGradientWidget *m_hGradient; @@ -137,6 +141,25 @@ void readSettings(); void getICCInfo(const QString&); + bool useBPC(); + bool doProof(); + bool checkGamut(); + bool embedProfile(); + + bool useEmbeddedProfile(); + bool useBuiltinProfile(); + bool useDefaultInProfile(); + bool useSelectedInProfile(); + + bool useDefaultSpaceProfile(); + bool useSelectedSpaceProfile(); + + bool useDefaultDisplayProfile(); + bool useSelectedDisplayProfile(); + + bool useDefaultProofProfile(); + bool useSelectedProofProfile(); + private slots: void slotDefault(); _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |