Commit 984dcf90 authored by Gilles Caulier's avatar Gilles Caulier 🗼
Browse files

fix curve adjust BQM tool t use right color depth with image to process

BUGS: 281095
parent 211af8e2
......@@ -77,6 +77,9 @@ void CurvesFilter::filterImage()
curves = depthCurve;
}
kDebug() << "Image 16 bits: " << m_orgImage.sixteenBit();
kDebug() << "Curve 16 bits: " << curves.isSixteenBits();
postProgress(50);
// Process all channels curves
......
......@@ -6,7 +6,7 @@
* Date : 2010-03-02
* Description : Curves Adjust batch tool.
*
* Copyright (C) 2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2010-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......@@ -103,12 +103,12 @@ BatchToolSettings CurvesAdjust::defaultSettings()
{
BatchToolSettings prm;
CurvesContainer defaultPrm = m_settingsView->defaultSettings();
prm.insert("curvesType", (int)defaultPrm.curvesType);
prm.insert("values[LuminosityChannel]", defaultPrm.values[LuminosityChannel]);
prm.insert("values[RedChannel]", defaultPrm.values[RedChannel]);
prm.insert("values[GreenChannel]", defaultPrm.values[GreenChannel]);
prm.insert("values[BlueChannel]", defaultPrm.values[BlueChannel]);
prm.insert("values[AlphaChannel]", defaultPrm.values[AlphaChannel]);
prm.insert("curvesType", (int)defaultPrm.curvesType);
prm.insert("values[LuminosityChannel]", defaultPrm.values[LuminosityChannel]);
prm.insert("values[RedChannel]", defaultPrm.values[RedChannel]);
prm.insert("values[GreenChannel]", defaultPrm.values[GreenChannel]);
prm.insert("values[BlueChannel]", defaultPrm.values[BlueChannel]);
prm.insert("values[AlphaChannel]", defaultPrm.values[AlphaChannel]);
return prm;
}
......@@ -117,12 +117,12 @@ void CurvesAdjust::slotAssignSettings2Widget()
{
CurvesContainer prm;
prm.curvesType = (ImageCurves::CurveType)settings()["curvesType"].toInt();
prm.values[LuminosityChannel] = settings()["values[LuminosityChannel]"].value<QPolygon>();
prm.values[RedChannel] = settings()["values[RedChannel]"].value<QPolygon>();
prm.values[GreenChannel] = settings()["values[GreenChannel]"].value<QPolygon>();
prm.values[BlueChannel] = settings()["values[BlueChannel]"].value<QPolygon>();
prm.values[AlphaChannel] = settings()["values[AlphaChannel]"].value<QPolygon>();
prm.curvesType = (ImageCurves::CurveType)settings()["curvesType"].toInt();
prm.values[LuminosityChannel] = settings()["values[LuminosityChannel]"].value<QPolygon>();
prm.values[RedChannel] = settings()["values[RedChannel]"].value<QPolygon>();
prm.values[GreenChannel] = settings()["values[GreenChannel]"].value<QPolygon>();
prm.values[BlueChannel] = settings()["values[BlueChannel]"].value<QPolygon>();
prm.values[AlphaChannel] = settings()["values[AlphaChannel]"].value<QPolygon>();
m_settingsView->setSettings(prm);
}
......@@ -134,10 +134,10 @@ void CurvesAdjust::slotSettingsChanged()
prm.insert("curvesType", (int)currentPrm.curvesType);
prm.insert("values[LuminosityChannel]", currentPrm.values[LuminosityChannel]);
prm.insert("values[RedChannel]", currentPrm.values[RedChannel]);
prm.insert("values[GreenChannel]", currentPrm.values[GreenChannel]);
prm.insert("values[BlueChannel]", currentPrm.values[BlueChannel]);
prm.insert("values[AlphaChannel]", currentPrm.values[AlphaChannel]);
prm.insert("values[RedChannel]", currentPrm.values[RedChannel]);
prm.insert("values[GreenChannel]", currentPrm.values[GreenChannel]);
prm.insert("values[BlueChannel]", currentPrm.values[BlueChannel]);
prm.insert("values[AlphaChannel]", currentPrm.values[AlphaChannel]);
BatchTool::slotSettingsChanged(prm);
}
......@@ -149,14 +149,13 @@ bool CurvesAdjust::toolOperations()
return false;
}
CurvesContainer prm;
prm.curvesType = (ImageCurves::CurveType)settings()["curvesType"].toInt();
prm.values[LuminosityChannel] = settings()["values[LuminosityChannel]"].value<QPolygon>();
prm.values[RedChannel] = settings()["values[RedChannel]"].value<QPolygon>();
prm.values[GreenChannel] = settings()["values[GreenChannel]"].value<QPolygon>();
prm.values[BlueChannel] = settings()["values[BlueChannel]"].value<QPolygon>();
prm.values[AlphaChannel] = settings()["values[AlphaChannel]"].value<QPolygon>();
CurvesContainer prm((ImageCurves::CurveType)settings()["curvesType"].toInt(), true);
prm.initialize();
prm.values[LuminosityChannel] = settings()["values[LuminosityChannel]"].value<QPolygon>();
prm.values[RedChannel] = settings()["values[RedChannel]"].value<QPolygon>();
prm.values[GreenChannel] = settings()["values[GreenChannel]"].value<QPolygon>();
prm.values[BlueChannel] = settings()["values[BlueChannel]"].value<QPolygon>();
prm.values[AlphaChannel] = settings()["values[AlphaChannel]"].value<QPolygon>();
CurvesFilter curves(&image(), 0L, prm);
curves.startFilterDirectly();
......
......@@ -6,7 +6,7 @@
* Date : 2010-03-02
* Description : Curves Adjust batch tool.
*
* Copyright (C) 2010 by Gilles Caulier <caulier dot gilles at gmail dot com>
* Copyright (C) 2010-2011 by Gilles Caulier <caulier dot gilles at gmail dot com>
*
* This program is free software; you can redistribute it
* and/or modify it under the terms of the GNU General
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment