Two small fixes: "Profile applies gamma" would not toggle image refresh; unnecessary clipping using ICC gamma

no issue since small
This commit is contained in:
Oliver Duis
2011-08-29 21:42:05 +02:00
parent a72159c403
commit 76181828df
3 changed files with 13 additions and 7 deletions

View File

@@ -1650,10 +1650,9 @@ void RawImageSource::colorSpaceConversion (Imagefloat* im, ColorManagementParams
#pragma omp parallel for
for (int i=0; i<im->height; i++)
for (int j=0; j<im->width; j++) {
//TODO: extend beyond 65535
im->r[i][j] = CurveFactory::gamma (CLIP(gd*im->r[i][j]));
im->g[i][j] = CurveFactory::gamma (CLIP(gd*im->g[i][j]));
im->b[i][j] = CurveFactory::gamma (CLIP(gd*im->b[i][j]));
im->r[i][j] = CurveFactory::gamma (gd*im->r[i][j]);
im->g[i][j] = CurveFactory::gamma (gd*im->g[i][j]);
im->b[i][j] = CurveFactory::gamma (gd*im->b[i][j]);
}
}
@@ -1763,9 +1762,9 @@ TMatrix work = iccStore->workingSpaceInverseMatrix (cmp.working);
#pragma omp parallel for
for (int i=0; i<im->height; i++)
for (int j=0; j<im->width; j++) {
im->r[i][j] = CurveFactory::gamma ((gd*im->r[i][j]));
im->g[i][j] = CurveFactory::gamma ((gd*im->g[i][j]));
im->b[i][j] = CurveFactory::gamma ((gd*im->b[i][j]));
im->r[i][j] = CurveFactory::gamma (gd*im->r[i][j]);
im->g[i][j] = CurveFactory::gamma (gd*im->g[i][j]);
im->b[i][j] = CurveFactory::gamma (gd*im->b[i][j]);
}
}

View File

@@ -169,6 +169,7 @@ ICMPanel::ICMPanel () : Gtk::VBox(), FoldableToolPanel(this), iunchanged(NULL),
icamera->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::ipChanged) );
iembedded->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::ipChanged) );
ifromfile->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::ipChanged) );
igamma->signal_toggled().connect( sigc::mem_fun(*this, &ICMPanel::profAppGammaChanged) );
ipc = ipDialog->signal_selection_changed().connect( sigc::mem_fun(*this, &ICMPanel::ipSelectionChanged) );
saveRef->signal_pressed().connect( sigc::mem_fun(*this, &ICMPanel::saveReferencePressed) );
@@ -353,6 +354,11 @@ void ICMPanel::ipChanged () {
oldip = profname;
}
void ICMPanel::profAppGammaChanged() {
if (listener) listener->panelChanged (EvIProfile, "");
}
void ICMPanel::GamChanged() {
if (batchMode) {
if (freegamma->get_inconsistent()) {

View File

@@ -78,6 +78,7 @@ class ICMPanel : public Gtk::VBox, public AdjusterListener, public FoldableToolP
void gpChanged ();
void GamChanged ();
void ipSelectionChanged ();
void profAppGammaChanged();
void setRaw (bool raw);
void saveReferencePressed ();