Merge pull request #3563 from Beep6581/printer-profile

Printer profile added in Preferences for soft-proofing
This commit is contained in:
Jean-Christophe 2017-01-01 23:12:28 +01:00 committed by GitHub
commit d29a94c2a7
18 changed files with 296 additions and 86 deletions

View File

@ -861,6 +861,7 @@ PREFERENCES_CLIPPINGIND;Indication du dépassement de plage dynamique
PREFERENCES_CLUTSCACHE;Cache HaldCLUT PREFERENCES_CLUTSCACHE;Cache HaldCLUT
PREFERENCES_CLUTSCACHE_LABEL;Nombre maximum de chache CLUT PREFERENCES_CLUTSCACHE_LABEL;Nombre maximum de chache CLUT
PREFERENCES_CLUTSDIR;Dossier HaldCLUT PREFERENCES_CLUTSDIR;Dossier HaldCLUT
PREFERENCES_CMMBPC;Compensation du point noir
PREFERENCES_CURVEBBOXPOS;Position des boutons copier/coller des courbes PREFERENCES_CURVEBBOXPOS;Position des boutons copier/coller des courbes
PREFERENCES_CURVEBBOXPOS_ABOVE;Au-dessus PREFERENCES_CURVEBBOXPOS_ABOVE;Au-dessus
PREFERENCES_CURVEBBOXPOS_BELOW;En-dessous PREFERENCES_CURVEBBOXPOS_BELOW;En-dessous
@ -926,8 +927,8 @@ PREFERENCES_GREYSC;Luminance Yb de la scène (%)
PREFERENCES_GREYSC18;Yb=18 CIE L#50 PREFERENCES_GREYSC18;Yb=18 CIE L#50
PREFERENCES_GREYSCA;Automatique PREFERENCES_GREYSCA;Automatique
PREFERENCES_HISTOGRAMPOSITIONLEFT;Histogramme dans le panneau de gauche PREFERENCES_HISTOGRAMPOSITIONLEFT;Histogramme dans le panneau de gauche
PREFERENCES_HISTOGRAMWORKING;Utiliser le profile de travail pour l'histograme principal et le Navigateur PREFERENCES_HISTOGRAMWORKING;Utiliser le profil de travail pour l'histograme principal et le Navigateur
PREFERENCES_HISTOGRAM_TOOLTIP;Si activé, le profile couleur de travail est utilisé pour les données d'histograme et le panneau Navigateur, sinon le profil de travail de sortie "gamma-corrigé" est utilisé. PREFERENCES_HISTOGRAM_TOOLTIP;Si activé, le profil couleur de travail est utilisé pour les données d'histograme et le panneau Navigateur, sinon le profil de travail de sortie "gamma-corrigé" est utilisé.
PREFERENCES_HLTHRESHOLD;Seuil pour le dépassement de domaine supérieur PREFERENCES_HLTHRESHOLD;Seuil pour le dépassement de domaine supérieur
PREFERENCES_ICCDIR;Dossier des profils ICC PREFERENCES_ICCDIR;Dossier des profils ICC
PREFERENCES_IMG_RELOAD_NEEDED;Ces changements nécessitent un rechargement de l'image (ou l'ouverture d'une autre image) pour prendre effet. PREFERENCES_IMG_RELOAD_NEEDED;Ces changements nécessitent un rechargement de l'image (ou l'ouverture d'une autre image) pour prendre effet.
@ -955,7 +956,10 @@ PREFERENCES_MENUGROUPRANK;Classement
PREFERENCES_MENUOPTIONS;Options du menu PREFERENCES_MENUOPTIONS;Options du menu
PREFERENCES_METADATA;Metadonnées PREFERENCES_METADATA;Metadonnées
PREFERENCES_MIN;Mini (100x115) PREFERENCES_MIN;Mini (100x115)
PREFERENCES_MONBPC;Compensation du Point Noir pour la transformation L*a*b*->Moniteur PREFERENCES_MONINTENT;Intention de rendu par défaut
PREFERENCES_MONITOR;Moniteur
PREFERENCES_MONPROFILE;Profil couleur par défaut
PREFERENCES_MONPROFILE_WARNOSX;Due à des limitations de MacOS, seul sRGB est supporté.
PREFERENCES_MULTITAB;Éditeurs multiple PREFERENCES_MULTITAB;Éditeurs multiple
PREFERENCES_MULTITABDUALMON;Éditeurs multiple, si possible sur un second moniteur PREFERENCES_MULTITABDUALMON;Éditeurs multiple, si possible sur un second moniteur
PREFERENCES_NAVGUIDEBRUSH;Couleur du cadre dans le Navigateur PREFERENCES_NAVGUIDEBRUSH;Couleur du cadre dans le Navigateur
@ -978,6 +982,7 @@ PREFERENCES_PREVDEMO;Méthode de Dématriçage de l'Aperçu
PREFERENCES_PREVDEMO_FAST;Rapide PREFERENCES_PREVDEMO_FAST;Rapide
PREFERENCES_PREVDEMO_LABEL;Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%: PREFERENCES_PREVDEMO_LABEL;Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%:
PREFERENCES_PREVDEMO_SIDECAR;Idem PP3 PREFERENCES_PREVDEMO_SIDECAR;Idem PP3
PREFERENCES_PRINTER;Imprimante (Épreuvage Écran)
PREFERENCES_PROFILEHANDLING;Gestionnaire des profils de traitement PREFERENCES_PROFILEHANDLING;Gestionnaire des profils de traitement
PREFERENCES_PROFILELOADPR;Priorité de chargement des profils PREFERENCES_PROFILELOADPR;Priorité de chargement des profils
PREFERENCES_PROFILEPRCACHE;Profil dans le Cache PREFERENCES_PROFILEPRCACHE;Profil dans le Cache
@ -985,6 +990,8 @@ PREFERENCES_PROFILEPRFILE;Profil accolé au fichier d'entrée
PREFERENCES_PROFILESAVECACHE;Enregistrer la paramètres de traitement dans le Cache PREFERENCES_PROFILESAVECACHE;Enregistrer la paramètres de traitement dans le Cache
PREFERENCES_PROFILESAVEINPUT;Enregistrer la paramètres de traitement accolé au fichier d'entrée PREFERENCES_PROFILESAVEINPUT;Enregistrer la paramètres de traitement accolé au fichier d'entrée
PREFERENCES_PROPERTY;Propriété PREFERENCES_PROPERTY;Propriété
PREFERENCES_PRTINTENT;Intention de rendu
PREFERENCES_PRTPROFILE;Profil couleur
PREFERENCES_PSPATH;Dossier d'installation d'Adobe Photoshop PREFERENCES_PSPATH;Dossier d'installation d'Adobe Photoshop
PREFERENCES_REMEMBERZOOMPAN;Se souvenir de niveau de zoom et de la position de l'image PREFERENCES_REMEMBERZOOMPAN;Se souvenir de niveau de zoom et de la position de l'image
PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Retient le niveau de zoom et la position de l'image courante lors de l'ouverture d'une nouvelle image.\n\nCette option ne fonctionne que dans le mode "Éditeur unique" et quand "Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%" is set to "Idem PP3". PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Retient le niveau de zoom et la position de l'image courante lors de l'ouverture d'une nouvelle image.\n\nCette option ne fonctionne que dans le mode "Éditeur unique" et quand "Méthode de dématriçage utilisé pour l'aperçu à un zoom <100%" is set to "Idem PP3".
@ -1085,8 +1092,8 @@ SAVEDLG_SUBSAMP_3;Meilleure qualité
SAVEDLG_TIFFUNCOMPRESSED;TIFF non compressé SAVEDLG_TIFFUNCOMPRESSED;TIFF non compressé
SAVEDLG_WARNFILENAME;Le fichier sera nommé SAVEDLG_WARNFILENAME;Le fichier sera nommé
SHCSELECTOR_TOOLTIP;Cliquez le bouton droit de la souris\npour réinitialiser la position de ces 3 curseurs SHCSELECTOR_TOOLTIP;Cliquez le bouton droit de la souris\npour réinitialiser la position de ces 3 curseurs
SOFTPROOF_GAMUTCHECK_TOOLTIP;Si activé, indique en gris les pixels dont la couleurs est en dehors du gamut du profile de sortie SOFTPROOF_GAMUTCHECK_TOOLTIP;Si activé, indique en gris les pixels dont la couleurs est en dehors du gamut du profil de sortie
SOFTPROOF_TOOLTIP;Épreuvage écran\nSi activé, simule le rendu généré par le profiles de sortie de l'outil ICM. Particulièrement utile pour simuler le rendu en sortie d'imprimante. SOFTPROOF_TOOLTIP;Épreuvage écran\nSi activé, simule le rendu généré par le profile de sortie de l'outil ICM. Particulièrement utile pour simuler le rendu en sortie d'imprimante.
THRESHOLDSELECTOR_B;Bas THRESHOLDSELECTOR_B;Bas
THRESHOLDSELECTOR_BL;Bas-gauche THRESHOLDSELECTOR_BL;Bas-gauche
THRESHOLDSELECTOR_BR;Bas-droite THRESHOLDSELECTOR_BR;Bas-droite
@ -1463,7 +1470,7 @@ TP_ICM_DCPILLUMINANT;Illuminant
TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolé TP_ICM_DCPILLUMINANT_INTERPOLATED;Interpolé
TP_ICM_DCPILLUMINANT_TOOLTIP;Sélectionne quel illuminant DCP inclus utiliser. La valeur par défaut est "Interpolé", qui est un mix entre les 2 profils inclus basé sur la Balance des Blancs choisie. Ce paramètre n'est actif que si un fichier DCP Bi-Illuminant avec support de l'interpolation est choisi. TP_ICM_DCPILLUMINANT_TOOLTIP;Sélectionne quel illuminant DCP inclus utiliser. La valeur par défaut est "Interpolé", qui est un mix entre les 2 profils inclus basé sur la Balance des Blancs choisie. Ce paramètre n'est actif que si un fichier DCP Bi-Illuminant avec support de l'interpolation est choisi.
TP_ICM_INPUTCAMERA;Celui de l'appareil photo TP_ICM_INPUTCAMERA;Celui de l'appareil photo
TP_ICM_INPUTCAMERAICC;Sél. auto du profile de l'APN TP_ICM_INPUTCAMERAICC;Sél. auto du profil de l'APN
TP_ICM_INPUTCAMERAICC_TOOLTIP;Utilise les profils d'entrée DCP ou ICC spécifiques à RawTherapee, qui sont plus précis qu'une simple matrice.\nDisponible pour certains appareils photo, ces profils sont stoqués dans le dossier /iccprofiles/input.\nCelui dont le nom de fichier correspond au champ EXIF "Modèle" (de l'appareil) est automatiquement sélectionné. TP_ICM_INPUTCAMERAICC_TOOLTIP;Utilise les profils d'entrée DCP ou ICC spécifiques à RawTherapee, qui sont plus précis qu'une simple matrice.\nDisponible pour certains appareils photo, ces profils sont stoqués dans le dossier /iccprofiles/input.\nCelui dont le nom de fichier correspond au champ EXIF "Modèle" (de l'appareil) est automatiquement sélectionné.
TP_ICM_INPUTCAMERA_TOOLTIP;Par ordre de préférence, utilise les matrices de couleur incluses dans le fichier RAW, les matrices de couleur simple fournies par RawTherapee ou celles de DCRaw TP_ICM_INPUTCAMERA_TOOLTIP;Par ordre de préférence, utilise les matrices de couleur incluses dans le fichier RAW, les matrices de couleur simple fournies par RawTherapee ou celles de DCRaw
TP_ICM_INPUTCUSTOM;Personnel TP_ICM_INPUTCUSTOM;Personnel
@ -1929,8 +1936,6 @@ ZOOMPANEL_ZOOMOUT;Zoom Arrière\nRaccourci: <b>-</b>
!MONITOR_PROFILE_SYSTEM;System default !MONITOR_PROFILE_SYSTEM;System default
!PARTIALPASTE_PRSHARPENING;Post-resize sharpening !PARTIALPASTE_PRSHARPENING;Post-resize sharpening
!PARTIALPASTE_RETINEX;Retinex !PARTIALPASTE_RETINEX;Retinex
!PREFERENCES_MONINTENT;Default monitor intent
!PREFERENCES_MONPROFILE;Default monitor profile
!PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list. !PREFERENCES_PARSEDEXTDOWNHINT;Move selected extension down in the list.
!PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list. !PREFERENCES_PARSEDEXTUPHINT;Move selected extension up in the list.
!PREFERENCES_PROFILE_NONE;None !PREFERENCES_PROFILE_NONE;None

View File

@ -907,6 +907,7 @@ PREFERENCES_CLIPPINGIND;Clipping Indication
PREFERENCES_CLUTSCACHE;HaldCLUT Cache PREFERENCES_CLUTSCACHE;HaldCLUT Cache
PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs PREFERENCES_CLUTSCACHE_LABEL;Maximum number of cached CLUTs
PREFERENCES_CLUTSDIR;HaldCLUT directory PREFERENCES_CLUTSDIR;HaldCLUT directory
PREFERENCES_CMMBPC;Black point compensation
PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons PREFERENCES_CURVEBBOXPOS;Position of curve copypasta buttons
PREFERENCES_CURVEBBOXPOS_ABOVE;Above PREFERENCES_CURVEBBOXPOS_ABOVE;Above
PREFERENCES_CURVEBBOXPOS_BELOW;Below PREFERENCES_CURVEBBOXPOS_BELOW;Below
@ -1001,9 +1002,10 @@ PREFERENCES_MENUGROUPRANK;Group "Rank"
PREFERENCES_MENUOPTIONS;Context Menu Options PREFERENCES_MENUOPTIONS;Context Menu Options
PREFERENCES_METADATA;Metadata PREFERENCES_METADATA;Metadata
PREFERENCES_MIN;Mini (100x115) PREFERENCES_MIN;Mini (100x115)
PREFERENCES_MONBPC;Black Point Compensation for the L*a*b*->Monitor transform PREFERENCES_MONINTENT;Default rendering intent
PREFERENCES_MONINTENT;Default monitor intent PREFERENCES_MONITOR;Monitor
PREFERENCES_MONPROFILE;Default monitor profile PREFERENCES_MONPROFILE;Default color profile
PREFERENCES_MONPROFILE_WARNOSX;Due to MacOS limitations, only sRGB is supported.
PREFERENCES_MULTITAB;Multiple Editor Tabs Mode PREFERENCES_MULTITAB;Multiple Editor Tabs Mode
PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode PREFERENCES_MULTITABDUALMON;Multiple Editor Tabs In Own Window Mode
PREFERENCES_NAVGUIDEBRUSH;Navigator guide color PREFERENCES_NAVGUIDEBRUSH;Navigator guide color
@ -1028,6 +1030,7 @@ PREFERENCES_PREVDEMO;Preview Demosaic Method
PREFERENCES_PREVDEMO_FAST;Fast PREFERENCES_PREVDEMO_FAST;Fast
PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom: PREFERENCES_PREVDEMO_LABEL;Demosaicing method used for the preview at <100% zoom:
PREFERENCES_PREVDEMO_SIDECAR;As in PP3 PREFERENCES_PREVDEMO_SIDECAR;As in PP3
PREFERENCES_PRINTER;Printer (Soft-Proofing)
PREFERENCES_PROFILEHANDLING;Processing Profile Handling PREFERENCES_PROFILEHANDLING;Processing Profile Handling
PREFERENCES_PROFILELOADPR;Processing profile loading priority PREFERENCES_PROFILELOADPR;Processing profile loading priority
PREFERENCES_PROFILEPRCACHE;Profile in cache PREFERENCES_PROFILEPRCACHE;Profile in cache
@ -1036,6 +1039,8 @@ PREFERENCES_PROFILESAVECACHE;Save processing profile to the cache
PREFERENCES_PROFILESAVEINPUT;Save processing profile next to the input file PREFERENCES_PROFILESAVEINPUT;Save processing profile next to the input file
PREFERENCES_PROFILE_NONE;None PREFERENCES_PROFILE_NONE;None
PREFERENCES_PROPERTY;Property PREFERENCES_PROPERTY;Property
PREFERENCES_PRTINTENT;Rendering intent
PREFERENCES_PRTPROFILE;Color profile
PREFERENCES_PSPATH;Adobe Photoshop installation directory PREFERENCES_PSPATH;Adobe Photoshop installation directory
PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset PREFERENCES_REMEMBERZOOMPAN;Remember zoom % and pan offset
PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3". PREFERENCES_REMEMBERZOOMPAN_TOOLTIP;Remember the zoom % and pan offset of the current image when opening a new image.\n\nThis option only works in "Single Editor Tab Mode" and when "Demosaicing method used for the preview at <100% zoom" is set to "As in PP3".

View File

@ -165,16 +165,20 @@ std::vector<Glib::ustring> getWorkingProfiles ()
return res; return res;
} }
std::vector<Glib::ustring> ICCStore::getProfiles (const bool onlyRgb) const std::vector<Glib::ustring> ICCStore::getProfiles (const ProfileType type) const
{ {
MyMutex::MyLock lock(mutex_); MyMutex::MyLock lock(mutex_);
std::vector<Glib::ustring> res; std::vector<Glib::ustring> res;
for (ProfileMap::const_iterator profile = fileProfiles.begin (); profile != fileProfiles.end (); ++profile) { for (const auto profile : fileProfiles) {
if (!onlyRgb || (onlyRgb && cmsGetColorSpace (profile->second) == cmsSigRgbData)) if ( (type==ICCStore::ProfileType::MONITOR && cmsGetDeviceClass(profile.second) == cmsSigDisplayClass && cmsGetColorSpace (profile.second) == cmsSigRgbData)
res.push_back (profile->first); || (type==ICCStore::ProfileType::PRINTER && cmsGetDeviceClass(profile.second) == cmsSigOutputClass)
|| (type==ICCStore::ProfileType::OUTPUT && cmsGetDeviceClass(profile.second) == cmsSigDisplayClass && cmsGetColorSpace (profile.second) == cmsSigRgbData) )
{
res.push_back (profile.first);
}
} }
return res; return res;

View File

@ -84,6 +84,12 @@ class ICCStore
public: public:
enum class ProfileType {
MONITOR,
PRINTER,
OUTPUT // (actually correspond to the same profiles than with MONITOR)
};
static ICCStore* getInstance (); static ICCStore* getInstance ();
void init (const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir); void init (const Glib::ustring& usrICCDir, const Glib::ustring& stdICCDir);
@ -112,7 +118,7 @@ public:
cmsHPROFILE getXYZProfile () const; cmsHPROFILE getXYZProfile () const;
cmsHPROFILE getsRGBProfile () const; cmsHPROFILE getsRGBProfile () const;
std::vector<Glib::ustring> getProfiles (const bool onlyRgb = false) const; std::vector<Glib::ustring> getProfiles (const ProfileType type = ProfileType::MONITOR) const;
std::vector<Glib::ustring> getProfilesFromDir (const Glib::ustring& dirName) const; std::vector<Glib::ustring> getProfilesFromDir (const Glib::ustring& dirName) const;
uint8_t getInputIntents (cmsHPROFILE profile) const; uint8_t getInputIntents (cmsHPROFILE profile) const;

View File

@ -781,7 +781,7 @@ void ImProcCoordinator::updatePreviewImage (int todo, Crop* cropCall)
lastOutputProfile = params.icm.output; lastOutputProfile = params.icm.output;
lastOutputIntent = params.icm.outputIntent; lastOutputIntent = params.icm.outputIntent;
lastOutputBPC = params.icm.outputBPC; lastOutputBPC = params.icm.outputBPC;
ipf.updateColorProfiles(params.icm, monitorProfile, monitorIntent, softProof, gamutCheck); ipf.updateColorProfiles(monitorProfile, monitorIntent, softProof, gamutCheck);
} }
// process crop, if needed // process crop, if needed

View File

@ -68,7 +68,7 @@ void ImProcFunctions::setScale (double iscale)
scale = iscale; scale = iscale;
} }
void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck) void ImProcFunctions::updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck)
{ {
// set up monitor transform // set up monitor transform
if (monitorTransform) { if (monitorTransform) {
@ -77,9 +77,14 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con
monitorTransform = nullptr; monitorTransform = nullptr;
cmsHPROFILE monitor = nullptr;
if (!monitorProfile.empty()) {
#if !defined(__APPLE__) // No support for monitor profiles on OS X, all data is sRGB #if !defined(__APPLE__) // No support for monitor profiles on OS X, all data is sRGB
monitor = iccStore->getProfile (monitorProfile);
cmsHPROFILE monitor = iccStore->getProfile (monitorProfile); #else
monitor = iccStore->getProfile ("RT_sRGB");
#endif
}
if (monitor) { if (monitor) {
MyMutex::MyLock lcmsLock (*lcmsMutex); MyMutex::MyLock lcmsLock (*lcmsMutex);
@ -91,25 +96,14 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con
if (softProof) { if (softProof) {
cmsHPROFILE oprof = nullptr; cmsHPROFILE oprof = nullptr;
if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8 if (!settings->printerProfile.empty()) {
GammaValues ga; oprof = iccStore->getProfile(settings->printerProfile);
iccStore->getGammaArray(icm, ga);
oprof = iccStore->createGammaProfile (icm, ga);
}
else if (!icm.output.empty() && icm.output != ColorManagementParams::NoICMString) {
if(icm.gamma != "default" || icm.freegamma) { // if select gamma output between BT709, sRGB, linear, low, high, 2.2 , 1.8
GammaValues ga;
iccStore->getGammaArray(icm, ga);
oprof = iccStore->createCustomGammaOutputProfile (icm, ga);
} else {
oprof = iccStore->getProfile(icm.output);
}
} }
if (oprof) { if (oprof) {
// NOCACHE is for thread safety, NOOPTIMIZE for precision // NOCACHE is for thread safety, NOOPTIMIZE for precision
flags = cmsFLAGS_SOFTPROOFING | cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE; flags = cmsFLAGS_SOFTPROOFING | cmsFLAGS_NOOPTIMIZE | cmsFLAGS_NOCACHE;
if (icm.outputBPC) { if (settings->printerBPC) {
flags |= cmsFLAGS_BLACKPOINTCOMPENSATION; flags |= cmsFLAGS_BLACKPOINTCOMPENSATION;
} }
if (gamutCheck) { if (gamutCheck) {
@ -119,7 +113,7 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con
iprof, TYPE_Lab_FLT, iprof, TYPE_Lab_FLT,
monitor, TYPE_RGB_8, monitor, TYPE_RGB_8,
oprof, oprof,
monitorIntent, icm.outputIntent, monitorIntent, settings->printerIntent,
flags flags
); );
if (monitorTransform) { if (monitorTransform) {
@ -138,8 +132,6 @@ void ImProcFunctions::updateColorProfiles (const ColorManagementParams& icm, con
cmsCloseProfile(iprof); cmsCloseProfile(iprof);
} }
#endif
} }
void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const ProcParams &params, LUTu & histogram) void ImProcFunctions::firstAnalysis (const Imagefloat* const original, const ProcParams &params, LUTu & histogram)

View File

@ -205,7 +205,7 @@ public:
bool needsPCVignetting (); bool needsPCVignetting ();
void firstAnalysis (const Imagefloat* const working, const ProcParams &params, LUTu & vhist16); void firstAnalysis (const Imagefloat* const working, const ProcParams &params, LUTu & vhist16);
void updateColorProfiles (const ColorManagementParams& icm, const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck); void updateColorProfiles (const Glib::ustring& monitorProfile, RenderingIntent monitorIntent, bool softProof, bool gamutCheck);
void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve, void rgbProc (Imagefloat* working, LabImage* lab, PipetteBuffer *pipetteBuffer, LUTf & hltonecurve, LUTf & shtonecurve, LUTf & tonecurve,
SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2, SHMap* shmap, int sat, LUTf & rCurve, LUTf & gCurve, LUTf & bCurve, float satLimit , float satLimitOpacity, const ColorGradientCurve & ctColorCurve, const OpacityCurve & ctOpacityCurve, bool opautili, LUTf & clcurve, LUTf & cl2curve, const ToneCurve & customToneCurve1, const ToneCurve & customToneCurve2,
const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve ); const ToneCurve & customToneCurvebw1, const ToneCurve & customToneCurvebw2, double &rrm, double &ggm, double &bbm, float &autor, float &autog, float &autob, DCPProfile *dcpProf, const DCPProfile::ApplyState &asIn, LUTu &histToneCurve );

View File

@ -946,7 +946,7 @@ IImage8* Thumbnail::processImage (const procparams::ProcParams& params, int rhei
ImProcFunctions ipf (&params, false); ImProcFunctions ipf (&params, false);
ipf.setScale (sqrt(double(fw * fw + fh * fh)) / sqrt(double(thumbImg->width * thumbImg->width + thumbImg->height * thumbImg->height))*scale); ipf.setScale (sqrt(double(fw * fw + fh * fh)) / sqrt(double(thumbImg->width * thumbImg->width + thumbImg->height * thumbImg->height))*scale);
ipf.updateColorProfiles (params.icm, options.rtSettings.monitorProfile, options.rtSettings.monitorIntent, false, false); ipf.updateColorProfiles (options.rtSettings.monitorProfile, options.rtSettings.monitorIntent, false, false);
LUTu hist16 (65536); LUTu hist16 (65536);

View File

@ -38,6 +38,9 @@ public:
int leveldnliss; // level of auto multi zone int leveldnliss; // level of auto multi zone
int leveldnautsimpl; // STD or EXPERT int leveldnautsimpl; // STD or EXPERT
Glib::ustring printerProfile; ///< ICC profile name used for soft-proofing a printer output
RenderingIntent printerIntent; ///< Colorimetric intent used with the above profile
bool printerBPC; ///< Black Point Compensation for the Labimage->Printer->Monitor transform
Glib::ustring monitorProfile; ///< ICC profile name used for the monitor Glib::ustring monitorProfile; ///< ICC profile name used for the monitor
RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile RenderingIntent monitorIntent; ///< Colorimetric intent used with the above profile
bool monitorBPC; ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between) bool monitorBPC; ///< Black Point Compensation for the Labimage->Monitor transform (directly, i.e. not soft-proofing and no WCS in between)

View File

@ -38,15 +38,19 @@ using namespace rtengine::procparams;
class EditorPanel::ColorManagementToolbar class EditorPanel::ColorManagementToolbar
{ {
private: private:
#if !defined(__APPLE__) // monitor profile not supported on apple
MyComboBoxText profileBox; MyComboBoxText profileBox;
#endif
PopUpButton intentBox; PopUpButton intentBox;
Gtk::ToggleButton softProof; Gtk::ToggleButton softProof;
Gtk::ToggleButton spGamutCheck; Gtk::ToggleButton spGamutCheck;
sigc::connection profileConn, intentConn; sigc::connection profileConn, intentConn, softproofConn;
bool canSProof;
rtengine::StagedImageProcessor* const& processor; rtengine::StagedImageProcessor* const& processor;
private: private:
#if !defined(__APPLE__) // monitor profile not supported on apple
void prepareProfileBox () void prepareProfileBox ()
{ {
profileBox.set_size_request (100, -1); profileBox.set_size_request (100, -1);
@ -58,13 +62,13 @@ private:
#else #else
profileBox.set_active (0); profileBox.set_active (0);
#endif #endif
const std::vector<Glib::ustring> profiles = rtengine::iccStore->getProfiles (rtengine::ICCStore::ProfileType::MONITOR);
const std::vector<Glib::ustring> profiles = rtengine::iccStore->getProfiles (true); for (const auto profile: profiles) {
for (std::vector<Glib::ustring>::const_iterator iterator = profiles.begin (); iterator != profiles.end (); ++iterator) { profileBox.append_text (profile);
profileBox.append_text (*iterator);
} }
profileBox.set_tooltip_text (profileBox.get_active_text ()); profileBox.set_tooltip_text (profileBox.get_active_text ());
} }
#endif
void prepareIntentBox () void prepareIntentBox ()
{ {
@ -86,6 +90,7 @@ private:
softProof.set_tooltip_markup(M("SOFTPROOF_TOOLTIP")); softProof.set_tooltip_markup(M("SOFTPROOF_TOOLTIP"));
softProof.set_active(false); softProof.set_active(false);
softProof.set_sensitive(canSProof);
softProof.show (); softProof.show ();
Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("spGamutCheck.png")); Gtk::Image *spGamutCheckImage = Gtk::manage (new RTImage ("spGamutCheck.png"));
@ -121,12 +126,15 @@ private:
void updateParameters (bool noEvent = false) void updateParameters (bool noEvent = false)
{ {
#if !defined(__APPLE__) // monitor profile not supported on apple
ConnectionBlocker profileBlocker (profileConn); ConnectionBlocker profileBlocker (profileConn);
#endif
ConnectionBlocker intentBlocker (intentConn); ConnectionBlocker intentBlocker (intentConn);
Glib::ustring profile; Glib::ustring profile;
#ifdef WIN32 #if !defined(__APPLE__) // monitor profile not supported on apple
#ifdef WIN32
if (profileBox.get_active_row_number () == 1) { if (profileBox.get_active_row_number () == 1) {
profile = rtengine::iccStore->getDefaultMonitorProfileName (); profile = rtengine::iccStore->getDefaultMonitorProfileName ();
if (profile.empty ()) { if (profile.empty ()) {
@ -138,10 +146,14 @@ private:
} else if (profileBox.get_active_row_number () > 1) { } else if (profileBox.get_active_row_number () > 1) {
profile = profileBox.get_active_text (); profile = profileBox.get_active_text ();
} }
#else #else
profile = profileBox.get_active_row_number () > 0 ? profileBox.get_active_text () : Glib::ustring (); profile = profileBox.get_active_row_number () > 0 ? profileBox.get_active_text () : Glib::ustring ();
#endif
#else
profile = "RT_sRGB";
#endif #endif
#if !defined(__APPLE__) // monitor profile not supported on apple
if (profileBox.get_active_row_number () == 0) { if (profileBox.get_active_row_number () == 0) {
profile.clear(); profile.clear();
@ -164,8 +176,8 @@ private:
intentBox.setItemSensitivity(0, supportsPerceptual); intentBox.setItemSensitivity(0, supportsPerceptual);
intentBox.setItemSensitivity(1, supportsRelativeColorimetric); intentBox.setItemSensitivity(1, supportsRelativeColorimetric);
intentBox.setItemSensitivity(2, supportsAbsoluteColorimetric); intentBox.setItemSensitivity(2, supportsAbsoluteColorimetric);
softProof.set_sensitive(true); softProof.set_sensitive(canSProof);
spGamutCheck.set_sensitive(true); spGamutCheck.set_sensitive(canSProof);
} else { } else {
intentBox.setItemSensitivity(0, true); intentBox.setItemSensitivity(0, true);
intentBox.setItemSensitivity(1, true); intentBox.setItemSensitivity(1, true);
@ -178,7 +190,7 @@ private:
profileBox.set_tooltip_text (profileBox.get_active_text ()); profileBox.set_tooltip_text (profileBox.get_active_text ());
} }
#endif
rtengine::RenderingIntent intent; rtengine::RenderingIntent intent;
switch (intentBox.getSelected ()) { switch (intentBox.getSelected ()) {
default: default:
@ -209,9 +221,18 @@ private:
void updateSoftProofParameters (bool noEvent = false) void updateSoftProofParameters (bool noEvent = false)
{ {
spGamutCheck.set_sensitive(softProof.get_active()); if (!canSProof) {
ConnectionBlocker profileBlocker (softproofConn);
softProof.set_active(false);
softProof.set_sensitive(false);
} else {
softProof.set_sensitive(profileBox.get_active_row_number () > 0);
}
spGamutCheck.set_sensitive(softProof.get_sensitive() && softProof.get_active());
#if !defined(__APPLE__) // monitor profile not supported on apple
if (profileBox.get_active_row_number () > 0) { if (profileBox.get_active_row_number () > 0) {
#endif
if (!noEvent) { if (!noEvent) {
processor->beginUpdateParams (); processor->beginUpdateParams ();
} }
@ -219,23 +240,30 @@ private:
if (!noEvent) { if (!noEvent) {
processor->endUpdateParams (rtengine::EvMonitorTransform); processor->endUpdateParams (rtengine::EvMonitorTransform);
} }
#if !defined(__APPLE__) // monitor profile not supported on apple
} }
#endif
} }
public: public:
explicit ColorManagementToolbar (rtengine::StagedImageProcessor* const& ipc) : explicit ColorManagementToolbar (rtengine::StagedImageProcessor* const& ipc) :
intentBox (Glib::ustring (), true), intentBox (Glib::ustring (), true),
canSProof(!options.rtSettings.printerProfile.empty() && options.rtSettings.printerProfile != "None"), // assuming the printer profile exist!
processor (ipc) processor (ipc)
{ {
#if !defined(__APPLE__) // monitor profile not supported on apple
prepareProfileBox (); prepareProfileBox ();
#endif
prepareIntentBox (); prepareIntentBox ();
prepareSoftProofingBox (); prepareSoftProofingBox ();
reset (); reset ();
softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled)); softproofConn = softProof.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::softProofToggled));
spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled));; spGamutCheck.signal_toggled().connect(sigc::mem_fun (this, &ColorManagementToolbar::spGamutCheckToggled));
#if !defined(__APPLE__) // monitor profile not supported on apple
profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::profileBoxChanged)); profileConn = profileBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::profileBoxChanged));
#endif
intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::intentBoxChanged)); intentConn = intentBox.signal_changed ().connect (sigc::mem_fun (this, &ColorManagementToolbar::intentBoxChanged));
} }
@ -244,7 +272,15 @@ public:
box->pack_end (spGamutCheck, Gtk::PACK_SHRINK, 0); box->pack_end (spGamutCheck, Gtk::PACK_SHRINK, 0);
box->pack_end (softProof, Gtk::PACK_SHRINK, 0); box->pack_end (softProof, Gtk::PACK_SHRINK, 0);
box->pack_end (*intentBox.buttonGroup, Gtk::PACK_SHRINK, 0); box->pack_end (*intentBox.buttonGroup, Gtk::PACK_SHRINK, 0);
#if !defined(__APPLE__) // monitor profile not supported on apple
box->pack_end (profileBox, Gtk::PACK_SHRINK, 0); box->pack_end (profileBox, Gtk::PACK_SHRINK, 0);
#endif
}
void canSoftProof(bool canSP)
{
canSProof = canSP;
updateSoftProofParameters();
} }
void updateProcessor() void updateProcessor()
@ -256,17 +292,19 @@ public:
void reset () void reset ()
{ {
ConnectionBlocker profileBlocker (profileConn);
ConnectionBlocker intentBlocker (intentConn); ConnectionBlocker intentBlocker (intentConn);
#if !defined(__APPLE__) // monitor profile not supported on apple
ConnectionBlocker profileBlocker (profileConn);
#ifdef WIN32 #ifdef WIN32
if (options.rtSettings.autoMonitorProfile) { if (options.rtSettings.autoMonitorProfile) {
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 1); setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 1);
} else { } else {
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0); setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
} }
#else #else
setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0); setActiveTextOrIndex (profileBox, options.rtSettings.monitorProfile, 0);
#endif
#endif #endif
switch (options.rtSettings.monitorIntent) switch (options.rtSettings.monitorIntent)
@ -2017,6 +2055,11 @@ void EditorPanel::tbShowHideSidePanels_managestate()
ShowHideSidePanelsconn.block (false); ShowHideSidePanelsconn.block (false);
} }
void EditorPanel::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC)
{
colorMgmtToolBar->canSoftProof(!printerProfile.empty() && printerProfile != "None");
}
void EditorPanel::updateTPVScrollbar (bool hide) void EditorPanel::updateTPVScrollbar (bool hide)
{ {
tpc->updateTPVScrollbar (hide); tpc->updateTPVScrollbar (hide);

View File

@ -208,6 +208,7 @@ public:
{ {
return isProcessing; return isProcessing;
} }
void updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC);
void updateTPVScrollbar (bool hide); void updateTPVScrollbar (bool hide);
void updateTabsUsesIcons (bool useIcons); void updateTabsUsesIcons (bool useIcons);
void updateHistogramPosition (int oldPosition, int newPosition); void updateHistogramPosition (int oldPosition, int newPosition);

View File

@ -472,9 +472,13 @@ public:
inline void setActiveTextOrIndex (Gtk::ComboBoxText& comboBox, const Glib::ustring& text, int index) inline void setActiveTextOrIndex (Gtk::ComboBoxText& comboBox, const Glib::ustring& text, int index)
{ {
comboBox.set_active_text (text); bool valueSet = false;
if (!text.empty()) {
comboBox.set_active_text (text);
valueSet = true;
}
if (comboBox.get_active_row_number () < 0) if (!valueSet || comboBox.get_active_row_number () < 0)
comboBox.set_active (index); comboBox.set_active (index);
} }

View File

@ -181,7 +181,7 @@ ICMPanel::ICMPanel () : FoldableToolPanel(this, "icm", M("TP_ICM_LABEL")), iunch
onames->append_text (M("TP_ICM_NOICM")); onames->append_text (M("TP_ICM_NOICM"));
onames->set_active (0); onames->set_active (0);
std::vector<Glib::ustring> opnames = iccStore->getProfiles (); std::vector<Glib::ustring> opnames = iccStore->getProfiles (rtengine::ICCStore::ProfileType::OUTPUT);
for (size_t i = 0; i < opnames.size(); i++) { for (size_t i = 0; i < opnames.size(); i++) {
onames->append_text (opnames[i]); onames->append_text (opnames[i]);

View File

@ -632,6 +632,9 @@ void Options::setDefaults ()
rtSettings.leveldnliss = 0; rtSettings.leveldnliss = 0;
rtSettings.leveldnautsimpl = 0; rtSettings.leveldnautsimpl = 0;
rtSettings.printerProfile = Glib::ustring();
rtSettings.printerIntent = rtengine::RI_RELATIVE;
rtSettings.printerBPC = true;
rtSettings.monitorProfile = Glib::ustring(); rtSettings.monitorProfile = Glib::ustring();
rtSettings.monitorIntent = rtengine::RI_RELATIVE; rtSettings.monitorIntent = rtengine::RI_RELATIVE;
rtSettings.monitorBPC = true; rtSettings.monitorBPC = true;
@ -1450,6 +1453,18 @@ int Options::readFromFile (Glib::ustring fname)
rtSettings.iccDirectory = keyFile.get_string ("Color Management", "ICCDirectory"); rtSettings.iccDirectory = keyFile.get_string ("Color Management", "ICCDirectory");
} }
if (keyFile.has_key ("Color Management", "PrinterIntent")) {
rtSettings.printerIntent = static_cast<rtengine::RenderingIntent>(keyFile.get_integer("Color Management", "PrinterIntent"));
}
if (keyFile.has_key ("Color Management", "PrinterBPC")) {
rtSettings.printerBPC = keyFile.get_boolean("Color Management", "PrinterBPC");
}
if (keyFile.has_key ("Color Management", "PrinterProfile")) {
rtSettings.printerProfile = keyFile.get_string ("Color Management", "PrinterProfile");
}
if (keyFile.has_key ("Color Management", "MonitorProfile")) { if (keyFile.has_key ("Color Management", "MonitorProfile")) {
rtSettings.monitorProfile = keyFile.get_string ("Color Management", "MonitorProfile"); rtSettings.monitorProfile = keyFile.get_string ("Color Management", "MonitorProfile");
} }
@ -2031,6 +2046,10 @@ int Options::saveToFile (Glib::ustring fname)
keyFile.set_integer ("Crop Settings", "PPI", cropPPI); keyFile.set_integer ("Crop Settings", "PPI", cropPPI);
keyFile.set_string ("Color Management", "PrinterProfile", rtSettings.printerProfile);
keyFile.set_integer ("Color Management", "PrinterIntent", rtSettings.printerIntent);
keyFile.set_boolean ("Color Management", "PrinterBPC", rtSettings.printerBPC);
keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory); keyFile.set_string ("Color Management", "ICCDirectory", rtSettings.iccDirectory);
keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile); keyFile.set_string ("Color Management", "MonitorProfile", rtSettings.monitorProfile);
keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile); keyFile.set_boolean ("Color Management", "AutoMonitorProfile", rtSettings.autoMonitorProfile);

View File

@ -685,63 +685,138 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
Gtk::VBox* mvbcm = Gtk::manage (new Gtk::VBox ()); Gtk::VBox* mvbcm = Gtk::manage (new Gtk::VBox ());
mvbcm->set_border_width (4); mvbcm->set_border_width (4);
mvbcm->set_spacing (4);
iccDir = Gtk::manage (new Gtk::FileChooserButton (M("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER)); iccDir = Gtk::manage (new Gtk::FileChooserButton (M("PREFERENCES_ICCDIR"), Gtk::FILE_CHOOSER_ACTION_SELECT_FOLDER));
Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_LEFT)); Gtk::Label* pdlabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_ICCDIR") + ":", Gtk::ALIGN_LEFT));
Gtk::HBox* iccdhb = Gtk::manage (new Gtk::HBox ());
iccdhb->set_spacing(4);
iccdhb->pack_start(*pdlabel, Gtk::PACK_SHRINK);
iccdhb->pack_start(*iccDir, Gtk::PACK_EXPAND_WIDGET);
iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged));
mvbcm->pack_start(*iccdhb, Gtk::PACK_SHRINK);
//------------------------- MONITOR ----------------------
Gtk::Frame* fmonitor = Gtk::manage( new Gtk::Frame (M("PREFERENCES_MONITOR")) );
Gtk::VBox* vbmonitor = Gtk::manage( new Gtk::VBox () );
vbmonitor->set_border_width (4);
monProfile = Gtk::manage (new Gtk::ComboBoxText ()); monProfile = Gtk::manage (new Gtk::ComboBoxText ());
Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_LEFT)); Gtk::Label* mplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE") + ":", Gtk::ALIGN_LEFT));
monIntent = Gtk::manage (new Gtk::ComboBoxText ()); monIntent = Gtk::manage (new Gtk::ComboBoxText ());
Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONINTENT")+":", Gtk::ALIGN_LEFT)); Gtk::Label* milabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_MONINTENT")+":", Gtk::ALIGN_LEFT));
monProfile->set_size_request(80, -1);
monProfile->append_text (M("PREFERENCES_PROFILE_NONE")); monProfile->append_text (M("PREFERENCES_PROFILE_NONE"));
monProfile->set_active (0); monProfile->set_active (0);
const std::vector<Glib::ustring> profiles = rtengine::ICCStore::getInstance ()->getProfiles (true); const std::vector<Glib::ustring> profiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::MONITOR);
for (std::vector<Glib::ustring>::const_iterator profile = profiles.begin (); profile != profiles.end (); ++profile) for (const auto profile : profiles) {
monProfile->append_text (*profile); monProfile->append_text (profile);
}
// same order as the enum // same order as the enum
monIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL")); monIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL"));
monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE")); monIntent->append_text (M("PREFERENCES_INTENT_RELATIVE"));
monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE")); monIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE"));
monIntent->set_active (1); monIntent->set_active (1);
monIntent->set_size_request(80, -1);
monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_MONBPC"))); monBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC")));
monBPC->set_active (true); monBPC->set_active (true);
iccDir->signal_selection_changed ().connect (sigc::mem_fun (this, &Preferences::iccDirChanged));
#if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851 #if defined(WIN32) // Auto-detection not implemented for Linux, see issue 851
cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_AUTOMONPROFILE"))); cbAutoMonProfile = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_AUTOMONPROFILE")));
autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::autoMonProfileToggled)); autoMonProfileConn = cbAutoMonProfile->signal_toggled().connect (sigc::mem_fun(*this, &Preferences::autoMonProfileToggled));
#endif
Gtk::Table* colt = Gtk::manage (new Gtk::Table (3, 2)); Gtk::Table* colt = Gtk::manage (new Gtk::Table (3, 2));
#else
Gtk::Table* colt = Gtk::manage (new Gtk::Table (2, 2));
#endif
int row = 0; int row = 0;
colt->attach (*pdlabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2);
colt->attach (*iccDir, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
#if !defined(__APPLE__) // monitor profile not supported on apple
++row;
colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); colt->attach (*mplabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2);
#if defined(__APPLE__) // monitor profile not supported on apple
colt->attach (*Gtk::manage (new Gtk::Label (M("PREFERENCES_MONPROFILE_WARNOSX"), Gtk::ALIGN_LEFT)), 1, 2, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2);
#else
colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); colt->attach (*monProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
#endif
#if defined(WIN32) #if defined(WIN32)
++row; ++row;
colt->attach (*cbAutoMonProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); colt->attach (*cbAutoMonProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
#endif
#endif #endif
++row; ++row;
colt->attach (*milabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2); colt->attach (*milabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2);
colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2); colt->attach (*monIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
mvbcm->pack_start (*colt, Gtk::PACK_SHRINK, 4); vbmonitor->pack_start (*colt, Gtk::PACK_SHRINK, 4);
mvbcm->pack_start (*monBPC, Gtk::PACK_SHRINK, 4); vbmonitor->pack_start (*monBPC, Gtk::PACK_SHRINK, 4);
#if defined(WIN32) #if defined(WIN32)
autoMonProfileToggled(); autoMonProfileToggled();
#endif #endif
fmonitor->add(*vbmonitor);
mvbcm->pack_start(*fmonitor, Gtk::PACK_SHRINK);
//------------------------- PRINTER ----------------------
Gtk::Frame* fprinter = Gtk::manage( new Gtk::Frame (M("PREFERENCES_PRINTER")) );
Gtk::VBox* vbprinter = Gtk::manage( new Gtk::VBox () );
vbprinter->set_border_width (4);
prtProfile = Gtk::manage (new Gtk::ComboBoxText ());
Gtk::Label* pplabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_PRTPROFILE") + ":", Gtk::ALIGN_LEFT));
prtIntent = Gtk::manage (new Gtk::ComboBoxText ());
Gtk::Label* pilabel = Gtk::manage (new Gtk::Label (M("PREFERENCES_PRTINTENT")+":", Gtk::ALIGN_LEFT));
prtProfile->set_size_request(80, -1);
prtProfile->append_text (M("PREFERENCES_PROFILE_NONE"));
prtProfile->set_active (0);
const std::vector<Glib::ustring> prtprofiles = rtengine::ICCStore::getInstance ()->getProfiles (rtengine::ICCStore::ProfileType::PRINTER);
for (const auto prtprofile : prtprofiles)
prtProfile->append_text (prtprofile);
// same order as the enum
prtIntent->append_text (M("PREFERENCES_INTENT_PERCEPTUAL"));
prtIntent->append_text (M("PREFERENCES_INTENT_RELATIVE"));
prtIntent->append_text (M("PREFERENCES_INTENT_ABSOLUTE"));
prtIntent->set_active (1);
prtIntent->set_size_request(80, -1);
prtBPC = Gtk::manage (new Gtk::CheckButton (M("PREFERENCES_CMMBPC")));
prtBPC->set_active (true);
Gtk::Table* coltp = Gtk::manage (new Gtk::Table (2, 2));
row = 0;
#if !defined(__APPLE__) // monitor profile not supported on apple
coltp->attach (*pplabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2);
coltp->attach (*prtProfile, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
#endif
++row;
coltp->attach (*pilabel, 0, 1, row, row + 1, Gtk::FILL, Gtk::SHRINK, 2, 2);
coltp->attach (*prtIntent, 1, 2, row, row + 1, Gtk::EXPAND | Gtk::FILL, Gtk::SHRINK, 2, 2);
vbprinter->pack_start (*coltp, Gtk::PACK_SHRINK, 4);
vbprinter->pack_start (*prtBPC, Gtk::PACK_SHRINK, 4);
#if defined(WIN32)
autoMonProfileToggled();
#endif
fprinter->add(*vbprinter);
mvbcm->pack_start(*fprinter, Gtk::PACK_SHRINK);
//------------------------- CIECAM ----------------------
Gtk::VBox* vbdp = Gtk::manage (new Gtk::VBox ()); Gtk::VBox* vbdp = Gtk::manage (new Gtk::VBox ());
vbdp->set_border_width (4); vbdp->set_border_width (4);
Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_VIEW") + ":", Gtk::ALIGN_LEFT)); Gtk::Label* viewlab = Gtk::manage (new Gtk::Label (M("PREFERENCES_VIEW") + ":", Gtk::ALIGN_LEFT));
@ -790,7 +865,7 @@ Gtk::Widget* Preferences::getColorManagementPanel ()
vbcielab->pack_start (*colo, Gtk::PACK_EXPAND_WIDGET, 4); vbcielab->pack_start (*colo, Gtk::PACK_EXPAND_WIDGET, 4);
fcielab->add (*vbcielab); fcielab->add (*vbcielab);
mvbcm->pack_start (*fcielab, Gtk::PACK_SHRINK, 4); mvbcm->pack_start (*fcielab, Gtk::PACK_SHRINK);
return mvbcm; return mvbcm;
} }
@ -1457,8 +1532,31 @@ void Preferences::storePreferences ()
moptions.CPBPath = txtCustProfBuilderPath->get_text(); moptions.CPBPath = txtCustProfBuilderPath->get_text();
moptions.CPBKeys = CPBKeyType(custProfBuilderLabelType->get_active_row_number()); moptions.CPBKeys = CPBKeyType(custProfBuilderLabelType->get_active_row_number());
if (!prtProfile->get_active_row_number()) {
moptions.rtSettings.printerProfile = "";
} else {
moptions.rtSettings.printerProfile = prtProfile->get_active_text ();
}
switch (prtIntent->get_active_row_number ()) {
default:
case 0:
moptions.rtSettings.printerIntent = rtengine::RI_PERCEPTUAL;
break;
case 1:
moptions.rtSettings.printerIntent = rtengine::RI_RELATIVE;
break;
case 2:
moptions.rtSettings.printerIntent = rtengine::RI_ABSOLUTE;
break;
}
moptions.rtSettings.printerBPC = prtBPC->get_active ();
#if !defined(__APPLE__) // monitor profile not supported on apple #if !defined(__APPLE__) // monitor profile not supported on apple
moptions.rtSettings.monitorProfile = monProfile->get_active_text (); if (!monProfile->get_active_row_number()) {
moptions.rtSettings.monitorProfile = "";
} else {
moptions.rtSettings.monitorProfile = monProfile->get_active_text ();
}
switch (monIntent->get_active_row_number ()) { switch (monIntent->get_active_row_number ()) {
default: default:
case 0: case 0:
@ -1588,6 +1686,21 @@ void Preferences::fillPreferences ()
rememberZoomPanCheckbutton->set_active (moptions.rememberZoomAndPan); rememberZoomPanCheckbutton->set_active (moptions.rememberZoomAndPan);
ctiffserialize->set_active(moptions.serializeTiffRead); ctiffserialize->set_active(moptions.serializeTiffRead);
setActiveTextOrIndex (*prtProfile, moptions.rtSettings.printerProfile, 0);
switch (moptions.rtSettings.printerIntent) {
default:
case rtengine::RI_PERCEPTUAL:
prtIntent->set_active (0);
break;
case rtengine::RI_RELATIVE:
prtIntent->set_active (1);
break;
case rtengine::RI_ABSOLUTE:
prtIntent->set_active (2);
break;
}
prtBPC->set_active (moptions.rtSettings.printerBPC);
#if !defined(__APPLE__) // monitor profile not supported on apple #if !defined(__APPLE__) // monitor profile not supported on apple
setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0); setActiveTextOrIndex (*monProfile, moptions.rtSettings.monitorProfile, 0);
switch (moptions.rtSettings.monitorIntent) { switch (moptions.rtSettings.monitorIntent) {
@ -2096,6 +2209,14 @@ void Preferences::workflowUpdate ()
parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition); parent->updateHistogramPosition(options.histogramPosition, moptions.histogramPosition);
} }
if( moptions.rtSettings.printerProfile != options.rtSettings.printerProfile
||moptions.rtSettings.printerBPC != options.rtSettings.printerBPC
||moptions.rtSettings.printerIntent != options.rtSettings.printerIntent)
{
// Update the position of the Histogram
parent->updateProfiles(moptions.rtSettings.printerProfile, moptions.rtSettings.printerIntent, moptions.rtSettings.printerBPC);
}
} }
void Preferences::switchFontTo(Glib::ustring newFont) void Preferences::switchFontTo(Glib::ustring newFont)

View File

@ -95,6 +95,9 @@ protected:
Gtk::CheckButton* showExpComp; Gtk::CheckButton* showExpComp;
Gtk::FileChooserButton* iccDir; Gtk::FileChooserButton* iccDir;
Gtk::ComboBoxText* prtProfile;
Gtk::ComboBoxText* prtIntent;
Gtk::CheckButton* prtBPC;
Gtk::ComboBoxText* monProfile; Gtk::ComboBoxText* monProfile;
Gtk::ComboBoxText* monIntent; Gtk::ComboBoxText* monIntent;
Gtk::CheckButton* monBPC; Gtk::CheckButton* monBPC;

View File

@ -795,15 +795,22 @@ void RTWindow::MoveFileBrowserToEditor()
} }
} }
void RTWindow::updateProfiles(const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC)
{
epanel->updateProfiles(printerProfile, printerIntent, printerBPC);
for(auto panel : epanels) {
panel.second->updateProfiles(printerProfile, printerIntent, printerBPC);
}
}
void RTWindow::updateTPVScrollbar (bool hide) void RTWindow::updateTPVScrollbar (bool hide)
{ {
fpanel->updateTPVScrollbar (hide); fpanel->updateTPVScrollbar (hide);
epanel->updateTPVScrollbar (hide); epanel->updateTPVScrollbar (hide);
std::map<Glib::ustring, EditorPanel*>::const_iterator itr; for(auto panel : epanels) {
panel.second->updateTPVScrollbar (hide);
for(itr = epanels.begin(); itr != epanels.end(); ++itr) {
((*itr).second)->updateTPVScrollbar (hide);
} }
} }
@ -812,10 +819,8 @@ void RTWindow::updateTabsUsesIcons (bool useIcons)
fpanel->updateTabsUsesIcons (useIcons); fpanel->updateTabsUsesIcons (useIcons);
epanel->updateTabsUsesIcons (useIcons); epanel->updateTabsUsesIcons (useIcons);
std::map<Glib::ustring, EditorPanel*>::const_iterator itr; for(auto panel : epanels) {
panel.second->updateTabsUsesIcons (useIcons);
for(itr = epanels.begin(); itr != epanels.end(); ++itr) {
((*itr).second)->updateTabsUsesIcons (useIcons);
} }
} }
@ -833,10 +838,8 @@ void RTWindow::updateHistogramPosition (int oldPosition, int newPosition)
{ {
epanel->updateHistogramPosition (oldPosition, newPosition); epanel->updateHistogramPosition (oldPosition, newPosition);
std::map<Glib::ustring, EditorPanel*>::const_iterator itr; for(auto panel : epanels) {
panel.second->updateHistogramPosition (oldPosition, newPosition);
for(itr = epanels.begin(); itr != epanels.end(); ++itr) {
((*itr).second)->updateHistogramPosition (oldPosition, newPosition);
} }
} }

View File

@ -104,6 +104,7 @@ public:
void MoveFileBrowserToEditor(); void MoveFileBrowserToEditor();
void MoveFileBrowserToMain(); void MoveFileBrowserToMain();
void updateProfiles (const Glib::ustring &printerProfile, rtengine::RenderingIntent printerIntent, bool printerBPC);
void updateTPVScrollbar (bool hide); void updateTPVScrollbar (bool hide);
void updateHistogramPosition (int oldPosition, int newPosition); void updateHistogramPosition (int oldPosition, int newPosition);
void updateTabsUsesIcons (bool useIcons); void updateTabsUsesIcons (bool useIcons);