Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Graphics
digiKam
Commits
984dcf90
Commit
984dcf90
authored
Aug 31, 2011
by
Gilles Caulier
🗼
Browse files
fix curve adjust BQM tool t use right color depth with image to process
BUGS: 281095
parent
211af8e2
Changes
3
Hide whitespace changes
Inline
Side-by-side
libs/dimg/filters/curves/curvesfilter.cpp
View file @
984dcf90
...
...
@@ -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
...
...
utilities/queuemanager/basetools/color/curvesadjust.cpp
View file @
984dcf90
...
...
@@ -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
();
...
...
utilities/queuemanager/basetools/color/curvesadjust.h
View file @
984dcf90
...
...
@@ -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
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment