Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
GNOME
GIMP
Commits
95f5cc86
Commit
95f5cc86
authored
Jun 20, 2005
by
William Skaggs
Browse files
Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/common/laplace.c: don't normalize the result. Fixes bug #306874?
parent
213deb5b
Changes
2
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
95f5cc86
2005-06-20 Bill Skaggs <weskaggs@primate.ucdavis.edu>
* plug-ins/common/laplace.c: don't normalize the
result. Fixes bug #306874?
2005-06-20 Michael Natterer <mitch@gimp.org>
* app/actions/documents-actions.c
...
...
plug-ins/common/laplace.c
View file @
95f5cc86
...
...
@@ -220,7 +220,6 @@ laplace (GimpDrawable *drawable)
gint
bytes
;
gint
current
;
gint
gradient
;
gint
max_gradient
=
0
;
gint
alpha
;
gint
counter
;
guchar
*
dest
,
*
d
;
...
...
@@ -231,7 +230,6 @@ laplace (GimpDrawable *drawable)
gint
row
,
col
;
gint
x1
,
y1
,
x2
,
y2
;
gint
minval
,
maxval
;
gfloat
scale
=
1
.
0
;
/* Get the input area. This is the bounding box of the selection in
* the image (or the entire image if there is no selection). Only
...
...
@@ -287,8 +285,6 @@ laplace (GimpDrawable *drawable)
gradient
=
(
0
.
5
*
MAX
((
maxval
-
cr
[
col
]),
(
cr
[
col
]
-
minval
)));
max_gradient
=
MAX
(
abs
(
gradient
),
max_gradient
);
*
d
++
=
(((
pr
[
col
-
bytes
]
+
pr
[
col
]
+
pr
[
col
+
bytes
]
+
cr
[
col
-
bytes
]
-
(
8
*
cr
[
col
])
+
cr
[
col
+
bytes
]
+
nr
[
col
-
bytes
]
+
nr
[
col
]
+
nr
[
col
+
bytes
])
>
0
)
?
...
...
@@ -322,7 +318,6 @@ laplace (GimpDrawable *drawable)
laplace_prepare_row
(
&
srcPR
,
cr
,
x1
,
y1
,
(
x2
-
x1
));
gimp_progress_init
(
_
(
"Cleanup..."
));
scale
=
(
255
.
0
/
(
gfloat
)
max_gradient
);
counter
=
0
;
/* loop through the rows, applying the laplace convolution */
...
...
@@ -344,9 +339,7 @@ laplace (GimpDrawable *drawable)
BLACK_REGION
(
nr
[
col
-
bytes
])
||
BLACK_REGION
(
nr
[
col
])
||
BLACK_REGION
(
nr
[
col
+
bytes
])))
?
(
gint
)
(
scale
*
((
float
)
((
current
>=
128
)
?
(
current
-
128
)
:
current
)))
:
0
);
((
current
>=
128
)
?
(
current
-
128
)
:
current
)
:
0
);
if
(
alpha
&&
(((
col
+
1
)
%
bytes
)
==
0
))
/* the alpha channel */
{
...
...
Write
Preview
Markdown
is supported
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